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

[FIX] Use rapids_find_package to get cugraph-ops #2148

Merged
merged 5 commits into from
Mar 27, 2022
Merged
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
2 changes: 1 addition & 1 deletion cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ target_include_directories(cugraph
# - link libraries -------------------------------------------------------------
target_link_libraries(cugraph
PUBLIC
cugraphops::cugraphops
cugraph-ops::cugraph-ops++
raft::raft
PRIVATE
cugraph::cuHornet
Expand Down
30 changes: 13 additions & 17 deletions cpp/cmake/thirdparty/get_libcugraphops.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,22 @@
# limitations under the License.
#=============================================================================

function(find_and_configure_cugraphops)
set(CUGRAPH_MIN_VERSION_cugraph_ops "${CUGRAPH_VERSION_MAJOR}.${CUGRAPH_VERSION_MINOR}.00")

if(TARGET cugraphops::cugraphops)
return()
endif()
function(find_and_configure_cugraph_ops)

rapids_find_generate_module(cugraphops
HEADER_NAMES graph/sampling.hpp
LIBRARY_NAMES cugraph-ops++
INCLUDE_SUFFIXES cugraph-ops
BUILD_EXPORT_SET cugraph-exports
INSTALL_EXPORT_SET cugraph-exports
)
set(oneValueArgs VERSION)
cmake_parse_arguments(PKG "" "${oneValueArgs}" "" ${ARGN})

rapids_find_package(cugraphops
trxcllnt marked this conversation as resolved.
Show resolved Hide resolved
REQUIRED
BUILD_EXPORT_SET cugraph-exports
INSTALL_EXPORT_SET cugraph-exports
rapids_find_package(cugraph-ops ${PKG_VERSION} REQUIRED
GLOBAL_TARGETS cugraph-ops::cugraph-ops++
BUILD_EXPORT_SET cugraph-exports
INSTALL_EXPORT_SET cugraph-exports
)

endfunction()

find_and_configure_cugraphops()
###
# To use a locally-built cugraph-ops package, set the CMake variable
# `-D cugraph-ops_ROOT=/path/to/cugraph-ops/build`
###
find_and_configure_cugraph_ops(VERSION ${CUGRAPH_MIN_VERSION_cugraph_ops})
2 changes: 1 addition & 1 deletion cpp/cmake/thirdparty/get_raft.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ endfunction()

# Change pinned tag and fork here to test a commit in CI
# To use a different RAFT locally, set the CMake variable
# RPM_raft_SOURCE=/path/to/local/raft
# CPM_raft_SOURCE=/path/to/local/raft
find_and_configure_raft(VERSION ${CUGRAPH_MIN_VERSION_raft}
FORK rapidsai
PINNED_TAG branch-${CUGRAPH_BRANCH_VERSION_raft}
Expand Down