Skip to content

Commit

Permalink
Reference test resources directly from source tree (#554)
Browse files Browse the repository at this point in the history
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 <logans@cottsay.net>
  • Loading branch information
cottsay authored Feb 5, 2021
1 parent 7a25a74 commit 0d4975e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions rcl/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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})

0 comments on commit 0d4975e

Please sign in to comment.