Skip to content

Commit

Permalink
Don't install test resources
Browse files Browse the repository at this point in the history
Rather copy them to the binary dir. This avoids installing the
resources, which is affected by the DESTDIR variable.

The custom command executes at build time rather than install time,
which means that installation is no longer required to run the tests.

Signed-off-by: Scott K Logan <logans@cottsay.net>
  • Loading branch information
cottsay committed May 11, 2020
1 parent 47501d1 commit abd8f95
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rcl/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -349,5 +349,6 @@ rcl_add_custom_gtest(test_security
)

# Install test resources
install(DIRECTORY ${test_resources_dir_name}
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
add_custom_target(${test_resources_dir_name} ALL
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/${test_resources_dir_name} ${test_resources_dir_name}
COMMENT "Copying test resources")

0 comments on commit abd8f95

Please sign in to comment.