Skip to content

Commit

Permalink
Use the new RAPIDS.cmake to fetch rapids-cmake (#838)
Browse files Browse the repository at this point in the history
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.

But 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:
  - Mark Harris (https://github.com/harrism)

URL: #838
  • Loading branch information
robertmaynard authored Jul 27, 2021
1 parent 4dc3625 commit 561be10
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@

cmake_minimum_required(VERSION 3.20.1 FATAL_ERROR)

include(FetchContent)
FetchContent_Declare(
rapids-cmake
GIT_REPOSITORY https://github.com/rapidsai/rapids-cmake.git
GIT_TAG origin/branch-21.08)
FetchContent_MakeAvailable(rapids-cmake)
file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-21.10/RAPIDS.cmake
${CMAKE_BINARY_DIR}/RAPIDS.cmake)
include(${CMAKE_BINARY_DIR}/RAPIDS.cmake)

include(rapids-cmake)
include(rapids-cpm)
include(rapids-export)
Expand Down

0 comments on commit 561be10

Please sign in to comment.