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

Use new raft::compiled_static targets #5572

Closed
Closed
Show file tree
Hide file tree
Changes from 5 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
2 changes: 1 addition & 1 deletion cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ if(BUILD_CUML_CPP_LIBRARY)
# because cumlprims_mg and cuML inherit their CUDA libs from the raft::raft
# INTERFACE target.
list(APPEND ${_cuml_cpp_libs_var_name}
$<$<BOOL:${CUML_RAFT_COMPILED}>:raft::compiled>
$<$<BOOL:${CUML_RAFT_COMPILED}>:${RAFT_COMPILED_LIB}>
$<TARGET_NAME_IF_EXISTS:cumlprims_mg::cumlprims_mg>
)

Expand Down
15 changes: 7 additions & 8 deletions cpp/cmake/thirdparty/get_raft.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ function(find_and_configure_raft)
string(APPEND RAFT_COMPONENTS " distributed")
endif()


if(PKG_COMPILE_LIBRARY)
string(APPEND RAFT_COMPONENTS " compiled")
if(NOT PKG_USE_RAFT_STATIC)
string(APPEND RAFT_COMPONENTS " compiled")
set(RAFT_COMPILED_LIB raft::compiled)
robertmaynard marked this conversation as resolved.
Show resolved Hide resolved
else()
string(APPEND RAFT_COMPONENTS " compiled_static")
set(RAFT_COMPILED_LIB raft::compiled_static)
robertmaynard marked this conversation as resolved.
Show resolved Hide resolved
endif()
set(RAFT_COMPILE_LIBRARY ON)
else()
set(RAFT_COMPILE_LIBRARY OFF)
endif()

set(RAFT_BUILD_SHARED_LIBS ON)
if(${PKG_USE_RAFT_STATIC})
set(RAFT_BUILD_SHARED_LIBS OFF)
endif()

# We need to set this each time so that on subsequent calls to cmake
# the raft-config.cmake re-evaluates the RAFT_NVTX value
set(RAFT_NVTX ${PKG_NVTX})
Expand All @@ -68,7 +68,6 @@ function(find_and_configure_raft)
OPTIONS
"BUILD_TESTS OFF"
"BUILD_BENCH OFF"
"BUILD_SHARED_LIBS ${RAFT_BUILD_SHARED_LIBS}"
"RAFT_COMPILE_LIBRARY ${PKG_COMPILE_LIBRARY}"
)

Expand Down