From badc68eafe81a2856ea174470e3d7c2157231e2b Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Mon, 22 Aug 2022 13:19:16 -0400 Subject: [PATCH] Update to CPM version 0.35.5 (#249) CPM has been updated to fix the breaking behavior we found in 0.35.4. Authors: - Robert Maynard (https://github.com/robertmaynard) Approvers: - Jason Lowe (https://github.com/jlowe) URL: https://github.com/rapidsai/rapids-cmake/pull/249 --- rapids-cmake/cpm/detail/download.cmake | 2 +- rapids-cmake/cpm/detail/get_proprietary_binary.cmake | 5 +++++ rapids-cmake/cpm/init.cmake | 7 ------- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/rapids-cmake/cpm/detail/download.cmake b/rapids-cmake/cpm/detail/download.cmake index ffca46e8..7092e032 100644 --- a/rapids-cmake/cpm/detail/download.cmake +++ b/rapids-cmake/cpm/detail/download.cmake @@ -42,7 +42,7 @@ function(rapids_cpm_download) list(APPEND CMAKE_MESSAGE_CONTEXT "rapids.cpm.download") # When changing version verify no new variables needs to be propagated - set(CPM_DOWNLOAD_VERSION 0.35.3) + set(CPM_DOWNLOAD_VERSION 0.35.5) if(CPM_SOURCE_CACHE) # Expand relative path. This is important if the provided path contains a tilde (~) diff --git a/rapids-cmake/cpm/detail/get_proprietary_binary.cmake b/rapids-cmake/cpm/detail/get_proprietary_binary.cmake index 01b46d6d..195eda5e 100644 --- a/rapids-cmake/cpm/detail/get_proprietary_binary.cmake +++ b/rapids-cmake/cpm/detail/get_proprietary_binary.cmake @@ -70,6 +70,11 @@ function(rapids_cpm_get_proprietary_binary package_name version) include(FetchContent) set(pkg_name "${package_name}_proprietary_binary") + if(POLICY CMP0135) + cmake_policy(SET CMP0135 NEW) + set(CMAKE_POLICY_DEFAULT_CMP0135 NEW) + endif() + FetchContent_Declare(${pkg_name} URL ${proprietary_binary}) FetchContent_MakeAvailable(${pkg_name}) diff --git a/rapids-cmake/cpm/init.cmake b/rapids-cmake/cpm/init.cmake index 752be6cc..140b31c7 100644 --- a/rapids-cmake/cpm/init.cmake +++ b/rapids-cmake/cpm/init.cmake @@ -61,13 +61,6 @@ function(rapids_cpm_init) rapids_cpm_package_override("${_RAPIDS_OVERRIDE}") endif() - # Prefer to use the download time for timestamp, instead of the timestamp in the archive unless - # explicitly set by user. This allows for proper rebuilds when a projects url changes - if(POLICY CMP0135) - cmake_policy(SET CMP0135 NEW) - set(CMAKE_POLICY_DEFAULT_CMP0135 NEW CACHE STRING "") - endif() - include("${rapids-cmake-dir}/cpm/detail/download.cmake") rapids_cpm_download()