Skip to content

Commit

Permalink
Bring ament_add_gtest/target_link_libraries back together (#452)
Browse files Browse the repository at this point in the history
Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
  • Loading branch information
christophebedard authored Feb 16, 2024
1 parent 49d5794 commit 807fc79
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,9 @@ if(BUILD_TESTING)
ament_add_gtest(test_macros
test/test_macros.cpp
)
if(TARGET test_macros)
target_link_libraries(test_macros ${PROJECT_NAME})
endif()

add_performance_test(benchmark_logging test/benchmark/benchmark_logging.cpp)
if(TARGET benchmark_logging)
Expand All @@ -578,10 +581,6 @@ if(BUILD_TESTING)
if(TARGET benchmark_err_handle)
target_link_libraries(benchmark_err_handle ${PROJECT_NAME})
endif()

if(TARGET test_macros)
target_link_libraries(test_macros ${PROJECT_NAME})
endif()
endif()

# Export old-style CMake variables
Expand Down

0 comments on commit 807fc79

Please sign in to comment.