Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More robust solution of CMake policy 135 #224

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions rapids-cmake/cpm/detail/get_proprietary_binary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,6 @@ function(rapids_cpm_get_proprietary_binary package_name version)
include(FetchContent)
set(pkg_name "${package_name}_proprietary_binary")

# 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)
endif()

FetchContent_Declare(${pkg_name} URL ${proprietary_binary})
FetchContent_MakeAvailable(${pkg_name})

Expand Down
7 changes: 7 additions & 0 deletions rapids-cmake/cpm/init.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ 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()

Expand Down