]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
fix: Quiet cmake warning for extracted timestamps
authorRafael Kitover <rkitover@gmail.com>
Tue, 23 May 2023 21:42:12 +0000 (21:42 +0000)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 6 Jun 2023 19:32:17 +0000 (21:32 +0200)
For zstd and hiredis downloaded from the Internet, set cmake policy
CMP0135 to NEW to set the timestamps of extracted archive members to the
time of extraction to suppress the cmake dev warning on newer versions
of cmake.

Check that the policy exists so that this works on older versions of
cmake.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
cmake/Findhiredis.cmake
cmake/Findzstd.cmake

index 8c01058c2dbf6939ded5821b144099ffdd459c81..894fd335e7834b8bcd9d9de8ce42acb4997200a7 100644 (file)
@@ -2,6 +2,11 @@ if(hiredis_FOUND)
   return()
 endif()
 
+if(POLICY CMP0135)
+  # Set timestamps on extracted files to time of extraction.
+  cmake_policy(SET CMP0135 NEW)
+endif()
+
 set(hiredis_FOUND FALSE)
 
 if(HIREDIS_FROM_INTERNET AND NOT HIREDIS_FROM_INTERNET STREQUAL "AUTO")
index ff247634e49bacfc0863fab933bcd26ce99619b3..dd18b772242b5fd01827e983da980b763cbb4929 100644 (file)
@@ -2,6 +2,11 @@ if(zstd_FOUND)
   return()
 endif()
 
+if(POLICY CMP0135)
+  # Set timestamps on extracted files to time of extraction.
+  cmake_policy(SET CMP0135 NEW)
+endif()
+
 set(zstd_FOUND FALSE)
 
 if(ZSTD_FROM_INTERNET AND NOT ZSTD_FROM_INTERNET STREQUAL "AUTO")