[openwrt/openwrt] tools/cmake: update to 4.1.2
LEDE Commits
lede-commits at lists.infradead.org
Tue Nov 4 06:15:08 PST 2025
ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1b48ebd31c28f5b2ad3f964c25f34d33badbb979
commit 1b48ebd31c28f5b2ad3f964c25f34d33badbb979
Author: Hannu Nyman <hannu.nyman at iki.fi>
AuthorDate: Tue Oct 7 18:30:01 2025 +0300
tools/cmake: update to 4.1.2
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 at iki.fi>
Link: https://github.com/openwrt/openwrt/pull/20265
Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
tools/cmake/Makefile | 4 +--
tools/cmake/patches/100-no-testing.patch | 2 +-
tools/cmake/patches/110-liblzma.patch | 2 +-
.../patches/120-curl-fix-libressl-linking.patch | 38 ----------------------
.../patches/130-bootstrap_parallel_make_flag.patch | 2 +-
tools/cmake/patches/140-zlib.patch | 2 +-
tools/cmake/patches/150-zstd-libarchive.patch | 2 +-
.../patches/160-disable_xcode_generator.patch | 6 ++--
8 files changed, 10 insertions(+), 48 deletions(-)
diff --git a/tools/cmake/Makefile b/tools/cmake/Makefile
index 6bc79a7a55..797e99c1a0 100644
--- a/tools/cmake/Makefile
+++ b/tools/cmake/Makefile
@@ -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
diff --git a/tools/cmake/patches/100-no-testing.patch b/tools/cmake/patches/100-no-testing.patch
index 736a365e87..18e852cb49 100644
--- a/tools/cmake/patches/100-no-testing.patch
+++ b/tools/cmake/patches/100-no-testing.patch
@@ -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.
#]=======================================================================]
diff --git a/tools/cmake/patches/110-liblzma.patch b/tools/cmake/patches/110-liblzma.patch
index 4b8ec0d33f..d98d77209e 100644
--- a/tools/cmake/patches/110-liblzma.patch
+++ b/tools/cmake/patches/110-liblzma.patch
@@ -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
index 7fda7c59a0..0000000000
--- a/tools/cmake/patches/120-curl-fix-libressl-linking.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From: Jo-Philipp Wich <jo at 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 at 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")
diff --git a/tools/cmake/patches/130-bootstrap_parallel_make_flag.patch b/tools/cmake/patches/130-bootstrap_parallel_make_flag.patch
index 2409ba666f..0411c9f267 100644
--- a/tools/cmake/patches/130-bootstrap_parallel_make_flag.patch
+++ b/tools/cmake/patches/130-bootstrap_parallel_make_flag.patch
@@ -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
diff --git a/tools/cmake/patches/140-zlib.patch b/tools/cmake/patches/140-zlib.patch
index 17334a66e0..a4ca6f6a32 100644
--- a/tools/cmake/patches/140-zlib.patch
+++ b/tools/cmake/patches/140-zlib.patch
@@ -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()
diff --git a/tools/cmake/patches/150-zstd-libarchive.patch b/tools/cmake/patches/150-zstd-libarchive.patch
index 429ef80f54..c5cc9eef97 100644
--- a/tools/cmake/patches/150-zstd-libarchive.patch
+++ b/tools/cmake/patches/150-zstd-libarchive.patch
@@ -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)
diff --git a/tools/cmake/patches/160-disable_xcode_generator.patch b/tools/cmake/patches/160-disable_xcode_generator.patch
index f10981cd32..42c3003686 100644
--- a/tools/cmake/patches/160-disable_xcode_generator.patch
+++ b/tools/cmake/patches/160-disable_xcode_generator.patch
@@ -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__)
More information about the lede-commits
mailing list