From: Kefu Chai Date: Sat, 27 Aug 2022 01:51:02 +0000 (+0800) Subject: cmake: set CMP0135 policy X-Git-Tag: v18.0.0~144^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8103d11bd8312cf993f32f54e6173e382e83a5fa;p=ceph.git cmake: set CMP0135 policy so the `DOWNLOAD_EXTRACT_TIMESTAMP` property of `ExternalProject_Add()` command is set by default on CMake v3.24 and up. it helps to set the a more accurate timestamp for the downloaded content, hence the targets depending on the extracted content can be rebuilt if the URL changes. see also https://cmake.org/cmake/help/latest/policy/CMP0135.html Signed-off-by: Kefu Chai --- diff --git a/CMakeLists.txt b/CMakeLists.txt index df17fed6b152..042bb359c70a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,11 +14,11 @@ cmake_policy(SET CMP0065 NEW) cmake_policy(SET CMP0074 NEW) cmake_policy(SET CMP0075 NEW) cmake_policy(SET CMP0093 NEW) -foreach(policy CMP0127) +foreach(policy CMP0127 CMP0135) if(POLICY ${policy}) cmake_policy(SET ${policy} NEW) endif() -endif() +endforeach() list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/")