]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
tools/cmake: update to 4.1.2 20265/head
authorHannu Nyman <hannu.nyman@iki.fi>
Tue, 7 Oct 2025 15:30:01 +0000 (18:30 +0300)
committerChristian Marangi <ansuelsmth@gmail.com>
Tue, 4 Nov 2025 14:14:55 +0000 (15:14 +0100)
Update cmake to 4.1.2.
Note that cmake 4.x requires at least 3.5 as 'cmake_minimum_required'
in CMakeLists.txt of each app to be compiled.

Future cmake versions will increase that requirement to 3.10
https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/20265
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
tools/cmake/Makefile
tools/cmake/patches/100-no-testing.patch
tools/cmake/patches/110-liblzma.patch
tools/cmake/patches/120-curl-fix-libressl-linking.patch [deleted file]
tools/cmake/patches/130-bootstrap_parallel_make_flag.patch
tools/cmake/patches/140-zlib.patch
tools/cmake/patches/150-zstd-libarchive.patch
tools/cmake/patches/160-disable_xcode_generator.patch

index 6bc79a7a5564231a5874d762f2c7118ab549df88..797e99c1a09a4a84b8b03afd578c7debcf216979 100644 (file)
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cmake
-PKG_VERSION:=3.31.5
+PKG_VERSION:=4.1.2
 PKG_VERSION_MAJOR:=$(word 1,$(subst ., ,$(PKG_VERSION))).$(word 2,$(subst ., ,$(PKG_VERSION)))
 PKG_RELEASE:=1
 PKG_CPE_ID:=cpe:/a:kitware:cmake
@@ -15,7 +15,7 @@ PKG_CPE_ID:=cpe:/a:kitware:cmake
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/Kitware/CMake/releases/download/v$(PKG_VERSION)/ \
                https://cmake.org/files/v$(PKG_VERSION_MAJOR)/
-PKG_HASH:=66fb53a145648be56b46fa9e8ccade3a4d0dfc92e401e52ce76bdad1fea43d27
+PKG_HASH:=643f04182b7ba323ab31f526f785134fb79cba3188a852206ef0473fee282a15
 
 HOST_BUILD_PARALLEL:=1
 HOST_CONFIGURE_PARALLEL:=1
index 736a365e874a129f780eb220043d279234ba8859..18e852cb493dbd2954eb4d60a63f399a51ebdfec 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Modules/CTest.cmake
 +++ b/Modules/CTest.cmake
-@@ -47,7 +47,7 @@ the :variable:`CTEST_USE_LAUNCHERS` vari
+@@ -60,7 +60,7 @@ the :variable:`CTEST_USE_LAUNCHERS` vari
  in the ``CTestConfig.cmake`` file.
  #]=======================================================================]
  
index 4b8ec0d33f55bfbe5cccdc1705fc1c83dec96b08..d98d77209e2ba5edcafe3bbea3a9b558e2ba3dec 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Modules/FindLibLZMA.cmake
 +++ b/Modules/FindLibLZMA.cmake
-@@ -61,7 +61,13 @@ The following variables are provided for
+@@ -82,7 +82,13 @@ Finding the liblzma library and linking
  cmake_policy(PUSH)
  cmake_policy(SET CMP0159 NEW) # file(STRINGS) with REGEX updates CMAKE_MATCH_<n>
  
diff --git a/tools/cmake/patches/120-curl-fix-libressl-linking.patch b/tools/cmake/patches/120-curl-fix-libressl-linking.patch
deleted file mode 100644 (file)
index 7fda7c5..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-From: Jo-Philipp Wich <jo@mein.io>
-Date: Wed, 11 Jan 2017 03:36:04 +0100
-Subject: [PATCH] cmcurl: link librt
-
-When cmake is linked against LibreSSL, there might be an indirect
-dependency on librt on certain systems if LibreSSL's libcrypto uses
-clock_gettime() from librt:
-
-    [ 28%] Linking C executable LIBCURL
-    .../lib/libcrypto.a(getentropy_linux.o): In function `getentropy_fallback':
-    getentropy_linux.c:(.text+0x16d): undefined reference to `clock_gettime'
-    getentropy_linux.c:(.text+0x412): undefined reference to `clock_gettime'
-    collect2: error: ld returned 1 exit status
-    make[5]: *** [Utilities/cmcurl/LIBCURL] Error 1
-
-Modify the cmcurl CMakeLists.txt to check for clock_gettime() in librt
-and unconditionally link the rt library when the symbol is found.
-
-Signed-off-by: Jo-Philipp Wich <jo@mein.io>
----
---- a/Utilities/cmcurl/CMakeLists.txt
-+++ b/Utilities/cmcurl/CMakeLists.txt
-@@ -775,7 +775,14 @@ if(CURL_USE_OPENSSL)
-   endif()
-   set(_ssl_enabled ON)
-   set(USE_OPENSSL ON)
--
-+  check_library_exists("rt" clock_gettime "" HAVE_LIBRT)
-+  if(HAVE_LIBRT)
-+    list(APPEND OPENSSL_LIBRARIES rt)
-+  endif()
-+  check_library_exists("pthread" pthread_once "" HAVE_PTHREAD)
-+  if(HAVE_PTHREAD)
-+    list(APPEND OPENSSL_LIBRARIES pthread)
-+  endif()
-   list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES})
-   include_directories(${OPENSSL_INCLUDE_DIR})
-   list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "openssl")
index 2409ba666f2df828fae24c817a637a92ba75a9ff..0411c9f2676deffaaf35934d231bcf554b2d749f 100644 (file)
@@ -1,6 +1,6 @@
 --- a/bootstrap
 +++ b/bootstrap
-@@ -1514,7 +1514,10 @@ int main(){ printf("1%c", (char)0x0a); r
+@@ -1520,7 +1520,10 @@ int main(){ printf("1%c", (char)0x0a); r
  ' > "test.c"
  cmake_original_make_flags="${cmake_make_flags}"
  if test "x${cmake_parallel_make}" != "x"; then
index 17334a66e0fa59e02254ec44204b11067b4a185e..a4ca6f6a32dab92b8702f08ae7aed5909cbd3924 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Modules/FindZLIB.cmake
 +++ b/Modules/FindZLIB.cmake
-@@ -120,10 +120,13 @@ else()
+@@ -147,10 +147,13 @@ else()
    set(ZLIB_NAMES_DEBUG zd zlibd zdlld zlibd1 zlib1d zlibstaticd zlibwapid zlibvcd zlibstatd)
  endif()
  
index 429ef80f54a0e7c27d8ba334b3b900e67123d742..c5cc9eef97165db991fba8b53bc5b945de3e1d59 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Utilities/cmlibarchive/CMakeLists.txt
 +++ b/Utilities/cmlibarchive/CMakeLists.txt
-@@ -680,7 +680,7 @@ IF(ENABLE_ZSTD)
+@@ -655,7 +655,7 @@ IF(ENABLE_ZSTD)
      SET(ZSTD_FIND_QUIETLY TRUE)
    ENDIF (ZSTD_INCLUDE_DIR)
  
index f10981cd32e7b22251588b89a6de09e76c5a34fe..42c300368673aa52e1ea8adbcb90470ab13241cf 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Source/CMakeLists.txt
 +++ b/Source/CMakeLists.txt
-@@ -888,7 +888,7 @@ if(CMake_USE_XCOFF_PARSER)
+@@ -886,7 +886,7 @@ if(CMake_USE_XCOFF_PARSER)
  endif()
  
  # Xcode only works on Apple
@@ -11,8 +11,8 @@
      PRIVATE
 --- a/Source/cmake.cxx
 +++ b/Source/cmake.cxx
-@@ -133,7 +133,7 @@
- #  include "cmGlobalGhsMultiGenerator.h"
+@@ -138,7 +138,7 @@
+ #  endif
  #endif
  
 -#if defined(__APPLE__)