From 9c53311004c950c22ad1d6620195a983de9654fc Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Mon, 26 Jul 2021 15:28:51 -0400 Subject: [PATCH] Use the new RAPIDS.cmake to fetch rapids-cmake 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. --- cpp/CMakeLists.txt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index eba8d75826..04eaf548ce 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -15,13 +15,9 @@ #============================================================================= 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-cuda)