]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cmake: set CMP0135 policy
authorKefu Chai <tchaikov@gmail.com>
Sat, 27 Aug 2022 01:51:02 +0000 (09:51 +0800)
committerKefu Chai <tchaikov@gmail.com>
Sat, 27 Aug 2022 01:56:47 +0000 (09:56 +0800)
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 <tchaikov@gmail.com>
CMakeLists.txt

index df17fed6b15280ed8b1ecfb31363df4c1760b9cb..042bb359c70afc80f1b46836d4a0f438b3abad2c 100644 (file)
@@ -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/")