From 76099d285e75d646ffd7dc0f3872b261ffedbb89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Monin?= Date: Tue, 29 Jul 2025 11:21:30 +0200 Subject: [PATCH] package/flatcc: fix cmake 4 compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a patch fixing cmake 4 compatibility, found in upstream pull request #349. The patch has been modified to apply on version 0.6.1 instead of the current upstream HEAD. Signed-off-by: Benoît Monin Signed-off-by: Romain Naour --- ..._required_version_to_3.5_for_cmake_4.patch | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 package/flatcc/0001-cmake_set_minimum_required_version_to_3.5_for_cmake_4.patch diff --git a/package/flatcc/0001-cmake_set_minimum_required_version_to_3.5_for_cmake_4.patch b/package/flatcc/0001-cmake_set_minimum_required_version_to_3.5_for_cmake_4.patch new file mode 100644 index 0000000000..9bfae54ae2 --- /dev/null +++ b/package/flatcc/0001-cmake_set_minimum_required_version_to_3.5_for_cmake_4.patch @@ -0,0 +1,51 @@ +From 915f62dcd9f0a372944f749cf4acd707db10c5fd Mon Sep 17 00:00:00 2001 +From: Alper Ak +Date: Wed, 9 Jul 2025 12:59:17 +0300 +Subject: [PATCH] cmake: Set minimum required version to 3.5 for CMake 4+ + compatibility + +Fix: + +| CMake Error at CMakeLists.txt:2 (cmake_minimum_required): +| Compatibility with CMake < 3.5 has been removed from CMake. +| +| Update the VERSION argument value. Or, use the ... syntax +| to tell CMake that the project requires at least but has been updated +| to work with policies introduced by or earlier. +| +| Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway. +| +| +| -- Configuring incomplete, errors occurred! + +Signed-off-by: Alper Ak +Signed-off-by: Benoît Monin +Upstream: https://github.com/dvidelabs/flatcc/pull/349 +--- + CMakeLists.txt | 2 +- + external/hash/CMakeLists.txt | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d4127f598..b51e5c5bd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,7 +2,7 @@ + #cmake_minimum_required (VERSION 2.8.12.2) + # Centos 7 + #cmake_minimum_required (VERSION 2.8.11) +-cmake_minimum_required (VERSION 2.8) ++cmake_minimum_required (VERSION 3.5) + + # Disable build of tests and samples. Due to custom build step + # dependency on flatcc tool, some custom build configurations may +diff --git a/external/hash/CMakeLists.txt b/external/hash/CMakeLists.txt +index 7b7d990dd..12eb3daa4 100644 +--- a/external/hash/CMakeLists.txt ++++ b/external/hash/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required (VERSION 3.0.2) ++cmake_minimum_required (VERSION 3.5) + + project (HashTest) +