From ae8b60ff8807cb900f7aae3e4480957ed5fc9b60 Mon Sep 17 00:00:00 2001 From: Super Zheng Date: Wed, 1 Feb 2023 15:19:16 +0800 Subject: [PATCH] chore(cmake): set `CMP0135` policy to new behavior explicitly --- buildconfig/cmake/InfraPackagesModule.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/buildconfig/cmake/InfraPackagesModule.cmake b/buildconfig/cmake/InfraPackagesModule.cmake index 7994bf75d..f9ccd52fa 100644 --- a/buildconfig/cmake/InfraPackagesModule.cmake +++ b/buildconfig/cmake/InfraPackagesModule.cmake @@ -84,7 +84,12 @@ macro(InfraPackage_Add packageName) list(APPEND FetchContent_Declare_ARG URL_HASH ${ARG_REMOTE_HASH}) endif () + cmake_policy(PUSH) + if (POLICY CMP0135) + cmake_policy(SET CMP0135 NEW) # valid for DOWNLOAD_EXTRACT_TIMESTAMP option in CMake 3.24 and later + endif () FetchContent_Declare(${FetchContent_Declare_ARG}) + cmake_policy(POP) FetchContent_MakeAvailable(${packageNameLower}) set(__return True) endif ()