Skip to content

Commit fd92fb8

Browse files
Use the new RAPIDS.cmake to fetch rapids-cmake (#1734)
The original approach of using FetchContent naively has a subtle bug when multiple projects that use rapids-cmake are combined together inside as sibling projects. This bug causes any `include(rapids-*)` commands to fail, causing CMake errors. Bug using `RAPIDS.cmake` we can resolve this issue and remove the new complex logic from each consumer. Authors: - Robert Maynard (https://github.com/robertmaynard) Approvers: - Brad Rees (https://github.com/BradReesWork) URL: #1734
1 parent f1dffc4 commit fd92fb8

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

cpp/CMakeLists.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,9 @@
1515
#=============================================================================
1616

1717
cmake_minimum_required(VERSION 3.20.1 FATAL_ERROR)
18-
include(FetchContent)
19-
FetchContent_Declare(
20-
rapids-cmake
21-
GIT_REPOSITORY https://github.com/rapidsai/rapids-cmake.git
22-
GIT_TAG origin/branch-21.08
23-
)
24-
FetchContent_MakeAvailable(rapids-cmake)
18+
file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-21.10/RAPIDS.cmake
19+
${CMAKE_BINARY_DIR}/RAPIDS.cmake)
20+
include(${CMAKE_BINARY_DIR}/RAPIDS.cmake)
2521

2622
include(rapids-cmake)
2723
include(rapids-cpm)

0 commit comments

Comments
 (0)