diff --git a/cpp/benchmarks/CMakeLists.txt b/cpp/benchmarks/CMakeLists.txt index 57592de59af..6227541e66b 100644 --- a/cpp/benchmarks/CMakeLists.txt +++ b/cpp/benchmarks/CMakeLists.txt @@ -56,8 +56,9 @@ add_custom_command( function(ConfigureBench CMAKE_BENCH_NAME) add_executable(${CMAKE_BENCH_NAME} ${ARGN}) set_target_properties( - ${CMAKE_BENCH_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY - "$" + ${CMAKE_BENCH_NAME} + PROPERTIES RUNTIME_OUTPUT_DIRECTORY "$" + INSTALL_RPATH "\$ORIGIN/../../../lib" ) target_link_libraries( ${CMAKE_BENCH_NAME} PRIVATE cudf_benchmark_common cudf_datagen benchmark::benchmark_main @@ -69,6 +70,13 @@ function(ConfigureBench CMAKE_BENCH_NAME) APPEND COMMENT "Adding ${CMAKE_BENCH_NAME}" ) + + install( + TARGETS ${CMAKE_BENCH_NAME} + COMPONENT testing + DESTINATION bin/benchmarks/libcudf + EXCLUDE_FROM_ALL + ) endfunction() # This function takes in a benchmark name and benchmark source for nvbench benchmarks and handles @@ -76,12 +84,19 @@ endfunction() function(ConfigureNVBench CMAKE_BENCH_NAME) add_executable(${CMAKE_BENCH_NAME} ${ARGN}) set_target_properties( - ${CMAKE_BENCH_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY - "$" + ${CMAKE_BENCH_NAME} + PROPERTIES RUNTIME_OUTPUT_DIRECTORY "$" + INSTALL_RPATH "\$ORIGIN/../../../lib" ) target_link_libraries( ${CMAKE_BENCH_NAME} PRIVATE cudf_benchmark_common cudf_datagen nvbench::main ) + install( + TARGETS ${CMAKE_BENCH_NAME} + COMPONENT testing + DESTINATION bin/benchmarks/libcudf + EXCLUDE_FROM_ALL + ) endfunction() # ################################################################################################## diff --git a/cpp/libcudf_kafka/tests/CMakeLists.txt b/cpp/libcudf_kafka/tests/CMakeLists.txt index db2131ba00c..afa10f02c16 100644 --- a/cpp/libcudf_kafka/tests/CMakeLists.txt +++ b/cpp/libcudf_kafka/tests/CMakeLists.txt @@ -20,13 +20,20 @@ function(ConfigureTest test_name) add_executable(${test_name} ${ARGN}) set_target_properties( - ${test_name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY - "$" + ${test_name} + PROPERTIES RUNTIME_OUTPUT_DIRECTORY "$" + INSTALL_RPATH "\$ORIGIN/../../../lib" ) target_link_libraries( ${test_name} PRIVATE GTest::gmock GTest::gmock_main GTest::gtest_main cudf_kafka ) add_test(NAME ${test_name} COMMAND ${test_name}) + install( + TARGETS ${test_name} + COMPONENT testing + DESTINATION bin/gtests/libcudf_kafka + EXCLUDE_FROM_ALL + ) endfunction() # ################################################################################################## diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index e23403e68e4..e7bc2a97881 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -20,11 +20,18 @@ function(ConfigureTest CMAKE_TEST_NAME) add_executable(${CMAKE_TEST_NAME} ${ARGN}) set_target_properties( - ${CMAKE_TEST_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY - "$" + ${CMAKE_TEST_NAME} + PROPERTIES RUNTIME_OUTPUT_DIRECTORY "$" + INSTALL_RPATH "\$ORIGIN/../../../lib" ) target_link_libraries(${CMAKE_TEST_NAME} PRIVATE cudftestutil GTest::gmock_main GTest::gtest_main) add_test(NAME ${CMAKE_TEST_NAME} COMMAND ${CMAKE_TEST_NAME}) + install( + TARGETS ${CMAKE_TEST_NAME} + COMPONENT testing + DESTINATION bin/gtests/libcudf + EXCLUDE_FROM_ALL + ) endfunction() # ##################################################################################################