Skip to content

Commit 8a6e747

Browse files
Update build infra to support new branching strategy (#7027)
rapids_config will use `RAPIDS_BRANCH` contents to determine what branch to use Authors: - Robert Maynard (https://github.com/robertmaynard) Approvers: - Bradley Dice (https://github.com/bdice) URL: #7027
1 parent 69639e4 commit 8a6e747

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

RAPIDS_BRANCH

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
branch-25.10

cmake/RAPIDS.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
cmake_minimum_required(VERSION 3.30.4 FATAL_ERROR)
1919

2020
# Allow users to control which version is used
21-
if(NOT rapids-cmake-version OR NOT rapids-cmake-version MATCHES [[^([0-9][0-9])\.([0-9][0-9])$]])
21+
if(NOT rapids-cmake-branch OR NOT rapids-cmake-version)
2222
message(
23-
FATAL_ERROR "The CMake variable rapids-cmake-version must be defined in the format MAJOR.MINOR."
23+
FATAL_ERROR "The CMake variable `rapids-cmake-branch` or `rapids-cmake-version` must be defined"
2424
)
2525
endif()
2626

@@ -33,7 +33,7 @@ endif()
3333
# Allow users to control which branch is fetched
3434
if(NOT rapids-cmake-branch)
3535
# Define a default branch if the user doesn't set one
36-
set(rapids-cmake-branch "branch-${rapids-cmake-version}")
36+
set(rapids-cmake-branch "release/${rapids-cmake-version}")
3737
endif()
3838

3939
# Allow users to control the exact URL passed to FetchContent

cmake/rapids_config.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,15 @@ else()
2525
"Could not determine RAPIDS version. Contents of VERSION file:\n${_rapids_version_formatted}")
2626
endif()
2727

28+
# Use STRINGS to trim whitespace/newlines
29+
file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/../RAPIDS_BRANCH" _rapids_branch)
30+
if(NOT _rapids_branch)
31+
message(
32+
FATAL_ERROR
33+
"Could not determine branch name to use for checking out rapids-cmake. The file \"${CMAKE_CURRENT_LIST_DIR}/../RAPIDS_BRANCH\" is missing."
34+
)
35+
endif()
36+
2837
set(rapids-cmake-version "${RAPIDS_VERSION_MAJOR_MINOR}")
38+
set(rapids-cmake-branch "${_rapids_branch}")
2939
include("${CMAKE_CURRENT_LIST_DIR}/RAPIDS.cmake")

0 commit comments

Comments
 (0)