Skip to content

Commit 807fc79

Browse files
Bring ament_add_gtest/target_link_libraries back together (#452)
Signed-off-by: Christophe Bedard <[email protected]>
1 parent 49d5794 commit 807fc79

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

CMakeLists.txt

+3-4
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,9 @@ if(BUILD_TESTING)
568568
ament_add_gtest(test_macros
569569
test/test_macros.cpp
570570
)
571+
if(TARGET test_macros)
572+
target_link_libraries(test_macros ${PROJECT_NAME})
573+
endif()
571574

572575
add_performance_test(benchmark_logging test/benchmark/benchmark_logging.cpp)
573576
if(TARGET benchmark_logging)
@@ -578,10 +581,6 @@ if(BUILD_TESTING)
578581
if(TARGET benchmark_err_handle)
579582
target_link_libraries(benchmark_err_handle ${PROJECT_NAME})
580583
endif()
581-
582-
if(TARGET test_macros)
583-
target_link_libraries(test_macros ${PROJECT_NAME})
584-
endif()
585584
endif()
586585

587586
# Export old-style CMake variables

0 commit comments

Comments
 (0)