From 300fcd7186ebc413354abeeb4215e4417137b733 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Mon, 26 Jul 2021 16:46:08 -0400 Subject: [PATCH] Use the new RAPIDS.cmake to fetch rapids-cmake (#298) 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: - Dante Gama Dessavre (https://github.com/dantegd) URL: https://github.com/rapidsai/raft/pull/298 --- 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)