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

renamed cmake function add_gtest

parent d53b14f2
No related branches found
No related tags found
1 merge request!13Main
Pipeline #17630 failed
......@@ -4,18 +4,18 @@ add_subdirectory(gtest)
############# USE THIS TEST AS AN EXAMPLE ####################
# #
# Create a specific test executable for gtest_example #
# laser_scan_utils_add_gtest(gtest_example gtest_example.cpp)#
# add_gtest(gtest_example gtest_example.cpp)#
# #
##############################################################
# gtest example
laser_scan_utils_add_gtest(gtest_example gtest_example.cpp)
add_gtest(gtest_example gtest_example.cpp)
# gtest icp
IF(csm_FOUND)
laser_scan_utils_add_gtest(gtest_icp gtest_icp.cpp)
add_gtest(gtest_icp gtest_icp.cpp)
ENDIF(csm_FOUND)
IF(falkolib_FOUND)
laser_scan_utils_add_gtest(gtest_loop_closure_falko gtest_loop_closure_falko.cpp)
add_gtest(gtest_loop_closure_falko gtest_loop_closure_falko.cpp)
ENDIF(falkolib_FOUND)
\ No newline at end of file
......@@ -8,7 +8,7 @@ FetchContent_Declare(
SET(INSTALL_GTEST OFF) # Disable installation of googletest
FetchContent_MakeAvailable(googletest)
function(${PROJECT_NAME}_add_gtest target)
function(add_gtest target)
add_executable(${target} ${ARGN})
target_link_libraries(${target} PUBLIC gtest_main ${PLUGIN_NAME})
add_test(NAME ${target} COMMAND ${target})
......
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