Skip to content

Commit

Permalink
Only depend on gtest when testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Daan Wijffels committed Jan 9, 2025
1 parent 0ece0a2 commit 5ca34cd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions diagnostic_remote_logging/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ set(dependencies
rclcpp
rclcpp_components
diagnostic_msgs
ament_cmake_gtest
CURL
)

Expand Down Expand Up @@ -46,10 +45,11 @@ install(TARGETS influx_component
)

if(BUILD_TESTING)
ament_add_gtest(unit_tests test/influx_line_protocol.cpp)
target_include_directories(unit_tests PRIVATE include)
target_link_libraries(unit_tests influx_component)
ament_target_dependencies(unit_tests ${dependencies})
find_package(ament_cmake_gtest REQUIRED)
ament_add_gtest(unit_tests test/influx_line_protocol.cpp)
target_include_directories(unit_tests PRIVATE include)
target_link_libraries(unit_tests influx_component)
ament_target_dependencies(unit_tests ${dependencies} ament_cmake_gtest)
endif()


Expand Down

0 comments on commit 5ca34cd

Please sign in to comment.