From: Hannu Nyman Date: Tue, 7 Oct 2025 15:30:01 +0000 (+0300) Subject: tools/cmake: update to 4.1.2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F20265%2Fhead;p=thirdparty%2Fopenwrt.git 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 Link: https://github.com/openwrt/openwrt/pull/20265 Signed-off-by: Christian Marangi --- diff --git a/tools/cmake/Makefile b/tools/cmake/Makefile index 6bc79a7a556..797e99c1a09 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 736a365e874..18e852cb493 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 4b8ec0d33f5..d98d77209e2 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_ 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 7fda7c59a09..00000000000 --- a/tools/cmake/patches/120-curl-fix-libressl-linking.patch +++ /dev/null @@ -1,38 +0,0 @@ -From: Jo-Philipp Wich -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 ---- ---- 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 2409ba666f2..0411c9f2676 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 17334a66e0f..a4ca6f6a32d 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 429ef80f54a..c5cc9eef971 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 f10981cd32e..42c30036867 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__)