Skip to content
Snippets Groups Projects
Commit c6867f70 authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

add_gtest

parent fa1c821a
No related branches found
No related tags found
1 merge request!28Main
Pipeline #17632 failed
...@@ -4,21 +4,21 @@ add_subdirectory(gtest) ...@@ -4,21 +4,21 @@ add_subdirectory(gtest)
############# USE THIS TEST AS AN EXAMPLE #################### ############# USE THIS TEST AS AN EXAMPLE ####################
# # # #
# Create a specific test executable for gtest_example # # Create a specific test executable for gtest_example #
# gnss_utils_add_gtest(gtest_example gtest_example.cpp) # # add_gtest(gtest_example gtest_example.cpp) #
# # # #
############################################################## ##############################################################
# Navigation test # Navigation test
gnss_utils_add_gtest(gtest_navigation gtest_navigation.cpp) add_gtest(gtest_navigation gtest_navigation.cpp)
# Observations test # Observations test
gnss_utils_add_gtest(gtest_observations gtest_observations.cpp) add_gtest(gtest_observations gtest_observations.cpp)
# TDCP test # TDCP test
gnss_utils_add_gtest(gtest_tdcp gtest_tdcp.cpp) add_gtest(gtest_tdcp gtest_tdcp.cpp)
# Transformations test # Transformations test
gnss_utils_add_gtest(gtest_transformations gtest_transformations.cpp) add_gtest(gtest_transformations gtest_transformations.cpp)
# ChiSquare test # ChiSquare test
gnss_utils_add_gtest(gtest_chisquare gtest_chisquare.cpp) add_gtest(gtest_chisquare gtest_chisquare.cpp)
\ No newline at end of file \ No newline at end of file
...@@ -8,8 +8,8 @@ FetchContent_Declare( ...@@ -8,8 +8,8 @@ FetchContent_Declare(
SET(INSTALL_GTEST OFF) # Disable installation of googletest SET(INSTALL_GTEST OFF) # Disable installation of googletest
FetchContent_MakeAvailable(googletest) FetchContent_MakeAvailable(googletest)
function(${PROJECT_NAME}_add_gtest target) function(add_gtest target)
add_executable(${target} ${ARGN}) add_executable(${target} ${ARGN})
target_link_libraries(${target} gtest_main ${PLUGIN_NAME}) target_link_libraries(${target} PUBLIC gtest_main ${PLUGIN_NAME})
add_test(NAME ${target} COMMAND ${target}) add_test(NAME ${target} COMMAND ${target})
endfunction() endfunction()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment