Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimized compilation of CUDFTESTUTIL's interface sources #18131

Open
wants to merge 4 commits into
base: branch-25.04
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1042,6 +1042,17 @@ if(CUDF_BUILD_TESTUTIL)
)
target_link_libraries(cudftestutil_impl INTERFACE cudf::cudftestutil)

# Base library for linking to cudf::cudftestutil, Note that targets should not directly link to
# cudf::cudftestutil_impl and should instead link to an OBJECT library that contains the compiled
# test utilities first
add_library(cudf_test_base OBJECT)
target_link_libraries(
cudf_test_base
PUBLIC cudf::cudftestutil GTest::gmock GTest::gmock_main GTest::gtest GTest::gtest_main
PRIVATE cudf::cudftestutil_impl
)
add_library(cudf::cudf_test_base ALIAS cudf_test_base)

install(FILES tests/io/metadata_utilities.cpp DESTINATION src/cudftestutil/io)
install(
FILES tests/utilities/column_utilities.cu
Expand Down
4 changes: 2 additions & 2 deletions cpp/benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function(ConfigureBench CMAKE_BENCH_NAME)
)
target_link_libraries(
${CMAKE_BENCH_NAME} PRIVATE cudf_benchmark_common cudf_datagen benchmark::benchmark_main
cudf::cudftestutil_impl $<TARGET_NAME_IF_EXISTS:conda_env>
cudf::cudf_test_base $<TARGET_NAME_IF_EXISTS:conda_env>
)
add_custom_command(
OUTPUT CUDF_BENCHMARKS
Expand Down Expand Up @@ -129,7 +129,7 @@ function(ConfigureNVBench CMAKE_BENCH_NAME)
target_link_libraries(
${CMAKE_BENCH_NAME}
PRIVATE cudf_benchmark_common ndsh_data_generator cudf_datagen nvbench::nvbench
$<TARGET_NAME_IF_EXISTS:conda_env> cudf::cudftestutil_impl
$<TARGET_NAME_IF_EXISTS:conda_env> cudf::cudf_test_base
)
install(
TARGETS ${CMAKE_BENCH_NAME}
Expand Down
12 changes: 2 additions & 10 deletions cpp/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,8 @@ function(ConfigureTest CMAKE_TEST_NAME)
)

target_link_libraries(
${CMAKE_TEST_NAME}
PRIVATE cudf::cudftestutil
cudf::cudftestutil_impl
GTest::gmock
GTest::gmock_main
GTest::gtest
GTest::gtest_main
nvtx3::nvtx3-cpp
$<TARGET_NAME_IF_EXISTS:conda_env>
"${_CUDF_TEST_EXTRA_LIBS}"
${CMAKE_TEST_NAME} PRIVATE cudf::cudf_test_base nvtx3::nvtx3-cpp
$<TARGET_NAME_IF_EXISTS:conda_env> "${_CUDF_TEST_EXTRA_LIBS}"
)
rapids_cuda_set_runtime(${CMAKE_TEST_NAME} USE_STATIC ${CUDA_STATIC_RUNTIME})
rapids_test_add(
Expand Down
Loading