diff --git a/rclcpp/CMakeLists.txt b/rclcpp/CMakeLists.txt index 2377920ba9..26d7e69362 100644 --- a/rclcpp/CMakeLists.txt +++ b/rclcpp/CMakeLists.txt @@ -222,13 +222,6 @@ if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) ament_lint_auto_find_test_dependencies() - # For benchmark tests. Currently these libraries can't be found if these calls - # are located in the CMakeLists.txt in test/rclcpp/benchmark, which implies - # some sort of scope issue - find_package(benchmark REQUIRED) - find_package(osrf_testing_tools_cpp REQUIRED) - find_package(performance_test_fixture REQUIRED) - add_subdirectory(test) endif() diff --git a/rclcpp/test/benchmark/CMakeLists.txt b/rclcpp/test/benchmark/CMakeLists.txt index 4fc3b66776..ab2cb3228f 100644 --- a/rclcpp/test/benchmark/CMakeLists.txt +++ b/rclcpp/test/benchmark/CMakeLists.txt @@ -1,3 +1,5 @@ +find_package(performance_test_fixture REQUIRED) + # Give cppcheck hints about macro definitions coming from outside this package get_target_property( ament_cmake_cppcheck_ADDITIONAL_INCLUDE_DIRS