diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 57b2cac3716..e851ebb5b63 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -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 diff --git a/cpp/cmake/thirdparty/get_libcugraphops.cmake b/cpp/cmake/thirdparty/get_libcugraphops.cmake index f490652fc8e..75ede9cde5c 100644 --- a/cpp/cmake/thirdparty/get_libcugraphops.cmake +++ b/cpp/cmake/thirdparty/get_libcugraphops.cmake @@ -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 - 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}) diff --git a/cpp/cmake/thirdparty/get_raft.cmake b/cpp/cmake/thirdparty/get_raft.cmake index 8b75753db91..c659424fea9 100644 --- a/cpp/cmake/thirdparty/get_raft.cmake +++ b/cpp/cmake/thirdparty/get_raft.cmake @@ -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}