Skip to content

Commit ef891a1

Browse files
authored
Change get_gtest to link statically and remove tests from package (#261)
Currently, the `librapidsmpf` packages ship gtest/gmock library and include files, which they shouldn't. Simplifying this down to the current version also in libcudf should fix that (i.e. by linking statically). I would just do this to keep similar to stay similar to other rapids libraries, unless this is somehow different? ~(I think there is another small issue with `mpi_tests` and `ucxx_tests` getting shipped in `librapidsmpf` rather than `librapidsmpf-tests`, but I'll have a look at it seperately.)~ Authors: - Sebastian Berg (https://github.com/seberg) Approvers: - Mads R. B. Kristensen (https://github.com/madsbk) - Peter Andreas Entschev (https://github.com/pentschev) - Gil Forsyth (https://github.com/gforsyth) URL: #261
1 parent 6877cb6 commit ef891a1

4 files changed

Lines changed: 6 additions & 20 deletions

File tree

cmake/thirdparty/get_gtest.cmake

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,7 @@ function(find_and_configure_gtest)
88
include(${rapids-cmake-dir}/cpm/gtest.cmake)
99

1010
# Find or install GoogleTest
11-
rapids_cpm_gtest(
12-
BUILD_EXPORT_SET rapidsmpf-testing-exports INSTALL_EXPORT_SET rapidsmpf-testing-exports
13-
)
14-
15-
if(GTest_ADDED)
16-
rapids_export(
17-
BUILD GTest
18-
VERSION ${GTest_VERSION}
19-
EXPORT_SET GTestTargets
20-
GLOBAL_TARGETS gtest gmock gtest_main gmock_main
21-
NAMESPACE GTest::
22-
)
23-
24-
include("${rapids-cmake-dir}/export/find_package_root.cmake")
25-
rapids_export_find_package_root(
26-
BUILD GTest [=[${CMAKE_CURRENT_LIST_DIR}]=] EXPORT_SET rapidsmpf-testing-exports
27-
)
28-
endif()
11+
rapids_cpm_gtest(BUILD_STATIC)
2912

3013
endfunction()
3114

conda/recipes/librapidsmpf/install_librapidsmpf.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
# SPDX-License-Identifier: Apache-2.0
44

55
cmake --install cpp/build
6+
cmake --install cpp/build --component=benchmarking

cpp/benchmarks/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ target_link_libraries(
2525
)
2626
install(
2727
TARGETS bench_shuffle
28-
COMPONENT testing
28+
COMPONENT benchmarking
2929
DESTINATION bin/benchmarks/librapidsmpf
3030
EXCLUDE_FROM_ALL
3131
)
@@ -51,7 +51,7 @@ target_link_libraries(
5151
)
5252
install(
5353
TARGETS bench_comm
54-
COMPONENT testing
54+
COMPONENT benchmarking
5555
DESTINATION bin/benchmarks/librapidsmpf
5656
EXCLUDE_FROM_ALL
5757
)

cpp/tests/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,13 @@ install(
138138
TARGETS ${testing_targets}
139139
DESTINATION bin/tests/librapidsmpf/gtests
140140
COMPONENT testing
141+
EXCLUDE_FROM_ALL
141142
)
142143

143144
# Install the CTestTestfile.cmake to bin/tests/librapidsmpf
144145
install(
145146
FILES "${RAPIDSMPF_BINARY_DIR}/tests/CTestTestfile.cmake"
146147
DESTINATION bin/tests/librapidsmpf
147148
COMPONENT testing
149+
EXCLUDE_FROM_ALL
148150
)

0 commit comments

Comments
 (0)