Skip to content

Commit

Permalink
Update get_rmm.cmake to better support CalVer (#258)
Browse files Browse the repository at this point in the history
Updates raft's get_rmm.cmake logic to work like cuML and cuGraph, so that it works better with CalVer. This helps when building RAPIDS libraries locally and depending on a local RMM (e.g. with rapids-compose).

Authors:
  - Mark Harris (https://github.com/harrism)

Approvers:
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: #258
  • Loading branch information
harrism authored Jun 8, 2021
1 parent 21cd7b0 commit f9b3c49
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cpp/cmake/thirdparty/get_rmm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,19 @@ function(find_and_configure_rmm VERSION)
return()
endif()

if(${VERSION} MATCHES [=[([0-9]+)\.([0-9]+)\.([0-9]+)]=])
set(MAJOR_AND_MINOR "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}")
else()
set(MAJOR_AND_MINOR "${VERSION}")
endif()

rapids_cpm_find(rmm ${VERSION}
GLOBAL_TARGETS rmm::rmm
BUILD_EXPORT_SET raft-exports
INSTALL_EXPORT_SET raft-exports
CPM_ARGS
GIT_REPOSITORY https://github.com/rapidsai/rmm.git
GIT_TAG branch-${VERSION}
GIT_TAG branch-${MAJOR_AND_MINOR}
GIT_SHALLOW TRUE
OPTIONS "BUILD_TESTS OFF"
"BUILD_BENCHMARKS OFF"
Expand All @@ -36,6 +42,6 @@ function(find_and_configure_rmm VERSION)

endfunction()

set(RAFT_MIN_VERSION_rmm "${RAFT_VERSION_MAJOR}.${RAFT_VERSION_MINOR}")
set(RAFT_MIN_VERSION_rmm "${RAFT_VERSION_MAJOR}.${RAFT_VERSION_MINOR}.00")

find_and_configure_rmm(${RAFT_MIN_VERSION_rmm})

0 comments on commit f9b3c49

Please sign in to comment.