From 8103d11bd8312cf993f32f54e6173e382e83a5fa Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 27 Aug 2022 09:51:02 +0800 Subject: [PATCH] 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 --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index df17fed6b15..042bb359c70 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/") -- 2.39.5