From f7d55da79ac669dcb79827169b65a77d1d9c4611 Mon Sep 17 00:00:00 2001 From: Stephen Brawner Date: Wed, 21 Oct 2020 11:31:44 -0700 Subject: [PATCH] Move find_package calls Signed-off-by: Stephen Brawner --- rclcpp/CMakeLists.txt | 7 ------- rclcpp/test/benchmark/CMakeLists.txt | 2 ++ 2 files changed, 2 insertions(+), 7 deletions(-) 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