]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
[cmake] Require minimum CMake version of 3.5 (#2555)
authorChristoph GrĂ¼ninger <foss@grueninger.de>
Wed, 26 Mar 2025 13:18:12 +0000 (14:18 +0100)
committerMartin Matuska <martin@matuska.de>
Sun, 30 Mar 2025 19:16:11 +0000 (21:16 +0200)
CMake 4.0 will be released soon and it refuses to accept a minimum
required version below 3.5 without additional flags.

(cherry picked from commit 4237b476fd4ef4b2b5ebac55811d92e73aeb5257)

CMakeLists.txt

index 6719a189c06945996028ed3607799eb1df4eee43..74e05cbfda5ee7bf84b6d746465e11c3ce85795b 100644 (file)
@@ -1,12 +1,9 @@
 #
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
 if(APPLE AND CMAKE_VERSION VERSION_LESS "3.17.0")
   message(WARNING "CMake>=3.17.0 required to make the generated shared library have the same Mach-O headers as autotools")
 endif()
 
-if(POLICY CMP0065)
-  cmake_policy(SET CMP0065 NEW) #3.4 don't use `-rdynamic` with executables
-endif()
 if(POLICY CMP0074)
   cmake_policy(SET CMP0074 NEW) #3.12.0 `find_package()`` uses ``<PackageName>_ROOT`` variables.
 endif()