From 0d4975e2fa8b67b921774e30c93d1e6aa4cc3e63 Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Fri, 5 Feb 2021 13:45:51 -0800 Subject: [PATCH] Reference test resources directly from source tree (#554) In CMake, 'install' should only be used for installing content to the final install space, and not for copying content into the build directory. Signed-off-by: Scott K Logan --- rcl/test/CMakeLists.txt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/rcl/test/CMakeLists.txt b/rcl/test/CMakeLists.txt index 3a11666a1..be8ad3484 100644 --- a/rcl/test/CMakeLists.txt +++ b/rcl/test/CMakeLists.txt @@ -20,8 +20,7 @@ include(cmake/rcl_add_custom_gtest.cmake) include(cmake/rcl_add_custom_launch_test.cmake) set(extra_lib_dirs "${rcl_lib_dir}") -set(test_resources_dir_name "resources") -add_definitions(-DTEST_RESOURCES_DIRECTORY="${CMAKE_CURRENT_BINARY_DIR}/${test_resources_dir_name}") +add_definitions(-DTEST_RESOURCES_DIRECTORY="${CMAKE_CURRENT_SOURCE_DIR}/resources") set(DISTRIBUTION "Unknown") if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") @@ -435,7 +434,3 @@ rcl_add_custom_gtest(test_log_level LIBRARIES ${PROJECT_NAME} mimick AMENT_DEPENDENCIES "osrf_testing_tools_cpp" ) - -# Install test resources -install(DIRECTORY ${test_resources_dir_name} - DESTINATION ${CMAKE_CURRENT_BINARY_DIR})