]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Address deprecated cmake version warning.
authorBradley Lowekamp <blowekamp@mail.nih.gov>
Tue, 26 Nov 2024 14:12:49 +0000 (09:12 -0500)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Sat, 7 Dec 2024 21:31:37 +0000 (22:31 +0100)
Use cmake_minimum_required(VERSION <min>...<policy_max>) syntax to set
the policy at the same time as the compatibile CMake version.

CMakeLists.txt
test/add-subdirectory-project/CMakeLists.txt
test/fuzz/CMakeLists.txt

index 92dc2d4d61a37e64ed43226450a9a3c66a3f1a2e..11e9ae5579bd004b0fb669415aa5160b77ef6991 100644 (file)
@@ -1,8 +1,6 @@
-cmake_minimum_required(VERSION 3.5.1)
+cmake_minimum_required(VERSION 3.5.1...3.29.0)
 if(CMAKE_VERSION VERSION_LESS 3.12)
     cmake_policy(VERSION ${CMAKE_VERSION})
-else()
-    cmake_policy(VERSION 3.5.1...3.29.0)
 endif()
 message(STATUS "Using CMake version ${CMAKE_VERSION}")
 
index 1b87005f72cfcbeac2a27367e7799b878358981e..a18626febb2f7d61963218784433815f40660317 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.5.1)
+cmake_minimum_required(VERSION 3.5.1...3.29.0)
 
 project(zlib-ng-add-subdirecory-test C)
 
index 27a04c0e7451a6d5b6735d69d93a34f05c61759d..beccef3b9a2f0984f43c5d29c22e8838c7e165b0 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.5.1)
+cmake_minimum_required(VERSION 3.5.1...3.29.0)
 
 if(CMAKE_C_COMPILER_ID MATCHES "Clang")
     enable_language(CXX)