Skip to content

Commit 7d8a6b0

Browse files
committed
fix: conditionally include nvtx3 INSTALL_EXPORT_SET based on absorption mode
1 parent 5ea5027 commit 7d8a6b0

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

cpp/cmake/thirdparty/get_nvtx.cmake

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@
99
function(find_and_configure_nvtx)
1010
include(${rapids-cmake-dir}/cpm/nvtx3.cmake)
1111

12-
# nvtx3 is private for cudf, but it is a public dependency of rmm. When rmm is absorbed into
13-
# libcudf via whole-archive, rmm's public transitive deps (including nvtx3-cpp) are promoted into
14-
# cudf's public interface. CMake's export validation requires that nvtx3-cpp be in an export set.
15-
rapids_cpm_nvtx3(
16-
BUILD_EXPORT_SET cudf-exports INSTALL_EXPORT_SET cudf-exports
17-
${CUDF_EXCLUDE_DEPS_FROM_ALL_FLAG}
18-
)
12+
# nvtx3 is part of rmm's public interface. Include it in the build export set so that
13+
# configure-time target resolution works. Only include it in the install export set when rmm is
14+
# NOT being absorbed — when absorbed, we bundle nvtx3 headers directly and consumers don't need
15+
# find_dependency(nvtx3).
16+
set(_nvtx_args BUILD_EXPORT_SET cudf-exports)
17+
if(CUDF_INSTALL_LIBRARY_DEPS)
18+
list(APPEND _nvtx_args INSTALL_EXPORT_SET cudf-exports)
19+
endif()
20+
rapids_cpm_nvtx3(${_nvtx_args} ${CUDF_EXCLUDE_DEPS_FROM_ALL_FLAG})
1921

2022
# Propagate source dir to parent scope (needed for header installation in standalone builds)
2123
set(nvtx3_SOURCE_DIR

0 commit comments

Comments
 (0)