Skip to contentSkip to conversation

physfs: Add patch for CMake 4+ compatibility

PATCH In review Alper Ak 2 participants 7 messages Jul 10, 2025 – Jul 11, 2025

lore
Share & tools
lore

Alper Ak

author
#0 lore raw

PATCH 1/5 physfs: Add patch for CMake 4+ compatibility

Fix:

| CMake Error at CMakeLists.txt:12 (cmake_minimum_required):
|   Compatibility with CMake < 3.5 has been removed from CMake.
|
|   Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
|   to tell CMake that the project requires at least <min> but has been updated
|   to work with policies introduced by <max> or earlier.
|
|   Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
|
|
| -- Configuring incomplete, errors occurred!
---
 .../0001-allow-build-with-cmake-4.patch       | 43 +++++++++++++++++++
 .../recipes-support/physfs/physfs_3.0.2.bb    |  3 +-
 2 files changed, 45 insertions(+), 1 deletion(-)
 create mode 100644 meta-filesystems/recipes-support/physfs/physfs/0001-allow-build-with-cmake-4.patch
meta-filesystems/recipes-support/physfs/physfs/0001-allow-build-with-cmake-4.patch new file +43 -0
new file mode 100644
index 0000000000..1584921e65
@@ -0,0 +1,43 @@
+From 09f8ca5776f5265571d95454b7307bbee56474da Mon Sep 17 00:00:00 2001
+From: Alper Ak <[email protected]>
+Date: Thu, 10 Jul 2025 13:19:24 +0300
+Subject: [PATCH] cmake: Set minimum required version to 3.5 for CMake 4+
+ compatibility
+
+Fix:
+
+| CMake Error at CMakeLists.txt:12 (cmake_minimum_required):
+|   Compatibility with CMake < 3.5 has been removed from CMake.
+|
+|   Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
+|   to tell CMake that the project requires at least <min> but has been updated
+|   to work with policies introduced by <max> or earlier.
+|
+|   Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
+|
+|
+| -- Configuring incomplete, errors occurred!
+
+Upstream-Status: Backport [https://github.com/icculus/physfs/commit/f7d24ce8486d9229207cca1ff98858fe60ffe583]
+
+Signed-off-by: Alper Ak <[email protected]>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4a67c27..f0f0183 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -9,7 +9,7 @@
+ #  compile, using preprocessor checks for platform-specific bits instead of
+ #  testing in here.
+ 
+-cmake_minimum_required(VERSION 2.8.4)
++cmake_minimum_required(VERSION 3.5)
+ 
+ project(PhysicsFS)
+ set(PHYSFS_VERSION 3.0.2)
+-- 
+2.43.0
+
meta-filesystems/recipes-support/physfs/physfs_3.0.2.bb +2 -1
index 57cfdcdf82..2571d3f6a0 100644
@@ -8,7 +8,8 @@ inherit cmake
 
 PE = "1"
 
-SRC_URI = "http://icculus.org/${BPN}/downloads/${BP}.tar.bz2"
+SRC_URI = "http://icculus.org/${BPN}/downloads/${BP}.tar.bz2 \
+        file://0001-allow-build-with-cmake-4.patch"
 SRC_URI[md5sum] = "dc751294aaf59d1359bbe34e693d1d87"
 SRC_URI[sha256sum] = "304df76206d633df5360e738b138c94e82ccf086e50ba84f456d3f8432f9f863"
 
Signature · 1 line
2.43.0
author
#1 lore raw

PATCH 2/5 srt: Add patch for CMake 4+ compatibility

Fix:

| CMake Error at CMakeLists.txt:10 (cmake_minimum_required):
|   Compatibility with CMake < 3.5 has been removed from CMake.
|
|   Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
|   to tell CMake that the project requires at least <min> but has been updated
|   to work with policies introduced by <max> or earlier.
|
|   Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
|
|
| -- Configuring incomplete, errors occurred!
---
 .../srt/0002-allow-build-with-cmake-4.patch   | 43 +++++++++++++++++++
 .../recipes-support/srt/srt_1.4.4.bb          |  1 +
 2 files changed, 44 insertions(+)
 create mode 100644 meta-multimedia/recipes-support/srt/srt/0002-allow-build-with-cmake-4.patch
meta-multimedia/recipes-support/srt/srt/0002-allow-build-with-cmake-4.patch new file +43 -0
new file mode 100644
index 0000000000..ba281a3a53
@@ -0,0 +1,43 @@
+From 5a71ca427a10fe89ad48e9dbb6641e4403d81fa7 Mon Sep 17 00:00:00 2001
+From: Alper Ak <[email protected]>
+Date: Thu, 10 Jul 2025 13:30:25 +0300
+Subject: [PATCH] cmake: Set minimum required version to 3.5 for CMake 4+
+ compatibility
+
+Fix:
+
+| CMake Error at CMakeLists.txt:10 (cmake_minimum_required):
+|   Compatibility with CMake < 3.5 has been removed from CMake.
+|
+|   Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
+|   to tell CMake that the project requires at least <min> but has been updated
+|   to work with policies introduced by <max> or earlier.
+|
+|   Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
+|
+|
+| -- Configuring incomplete, errors occurred!
+
+Upstream-Status: Backport [https://github.com/Haivision/srt/commit/0def1b1a1094fc57752f241250e9a1aed71bbffd]
+
+Signed-off-by: Alper Ak <[email protected]>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 328a433f..448d6254 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -7,7 +7,7 @@
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ #
+ 
+-cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
++cmake_minimum_required (VERSION 3.5 FATAL_ERROR)
+ set (SRT_VERSION 1.4.4)
+ 
+ set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/scripts")
+-- 
+2.43.0
+
meta-multimedia/recipes-support/srt/srt_1.4.4.bb +1 -0
index 91651fda8e..e72a36f657 100644
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=815ca599c9df247a0c7f619bab123dad"
 SRCREV = "8b32f3734ff6af7cc7b0fef272591cb80a2d1aae"
 SRC_URI = "git://github.com/Haivision/srt;protocol=https;branch=master \
            file://0001-don-t-install-srt-ffplay.patch \
+           file://0002-allow-build-with-cmake-4.patch \
            "
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
 
Signature · 1 line
2.43.0
author
#2 lore raw

PATCH 3/5 cmatrix: Add patch for CMake 4+ compatibility

In reply to Alper Ak

Fix:

| CMake Error at CMakeLists.txt:3 (cmake_minimum_required):
|   Compatibility with CMake < 3.5 has been removed from CMake.
|
|   Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
|   to tell CMake that the project requires at least <min> but has been updated
|   to work with policies introduced by <max> or earlier.
|
|   Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
|
|
| -- Configuring incomplete, errors occurred!
---
 .../0002-allow-build-with-cmake-4.patch       | 42 +++++++++++++++++++
 .../recipes-extended/cmatrix/cmatrix_2.0.bb   |  1 +
 2 files changed, 43 insertions(+)
 create mode 100644 meta-oe/recipes-extended/cmatrix/cmatrix/0002-allow-build-with-cmake-4.patch
meta-oe/recipes-extended/cmatrix/cmatrix/0002-allow-build-with-cmake-4.patch new file +42 -0
new file mode 100644
index 0000000000..ab5229a94a
@@ -0,0 +1,42 @@
+From 1099359c94bb3e404446d3624e4400823de27367 Mon Sep 17 00:00:00 2001
+From: Alper Ak <[email protected]>
+Date: Thu, 10 Jul 2025 13:39:21 +0300
+Subject: [PATCH] cmake: Set minimum required version to 3.5 for CMake 4+
+ compatibility
+
+Fix
+
+| CMake Error at CMakeLists.txt:3 (cmake_minimum_required):
+|   Compatibility with CMake < 3.5 has been removed from CMake.
+|
+|   Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
+|   to tell CMake that the project requires at least <min> but has been updated
+|   to work with policies introduced by <max> or earlier.
+|
+|   Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
+|
+|
+| -- Configuring incomplete, errors occurred!
+
+Upstream-Status: Submitted [https://github.com/abishekvashok/cmatrix/pull/201]
+
+Signed-off-by: Alper Ak <[email protected]>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a2f8b4d..3e60aec 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ # CMake build system for CMatrix
+ 
+-cmake_minimum_required(VERSION 2.8)
++cmake_minimum_required(VERSION 3.5)
+ 
+ project(CMatrix LANGUAGES C)
+ set(VERSION "2.0")
+-- 
+2.43.0
+
meta-oe/recipes-extended/cmatrix/cmatrix_2.0.bb +1 -0
index e1a6af622b..2c00c6ded4 100644
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 SRC_URI = " \
     git://github.com/abishekvashok/cmatrix.git;branch=stable;protocol=https \
     file://0001-reproducibility-Prevent-configuration-from-reading-h.patch \
+    file://0002-allow-build-with-cmake-4.patch \
 "
 SRCREV = "adfdf1656f23e5ab3b52c7d7edf91249a4477e8d"
 
Signature · 1 line
2.43.0
author
#3 lore raw

PATCH 4/5 sqlite-orm: Upgrade 1.5 -> 1.9.1 to allow CMake 4+ compatibility

In reply to Alper Ak

- Dropped the patch as the issue is already fixed in the newer version.
- The LICENSE file has changed so updated LIC_FILES_CHKSUM to match the new md5sum.
- Updated CMake flag to disable tests according to the new version.

Changelog:

https://github.com/fnc12/sqlite_orm/compare/v1.5...v1.9.1
https://github.com/fnc12/sqlite_orm/releases

Fix:

| CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
|   Compatibility with CMake < 3.5 has been removed from CMake.
|
|   Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
|   to tell CMake that the project requires at least <min> but has been updated
|   to work with policies introduced by <max> or earlier.
|
|   Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
|
|
| -- Configuring incomplete, errors occurred!
---
 ...01-fix-cstdint-error-with-gcc-15.0.1.patch | 52 -------------------
 ...{sqlite-orm_1.5.bb => sqlite-orm_1.9.1.bb} |  7 ++-
 2 files changed, 3 insertions(+), 56 deletions(-)
 delete mode 100644 meta-oe/recipes-devtools/sqlite-orm/sqlite-orm/0001-fix-cstdint-error-with-gcc-15.0.1.patch
 rename meta-oe/recipes-devtools/sqlite-orm/{sqlite-orm_1.5.bb => sqlite-orm_1.9.1.bb} (68%)
meta-oe/recipes-devtools/sqlite-orm/sqlite-orm/0001-fix-cstdint-error-with-gcc-15.0.1.patch deleted +0 -52
deleted file mode 100644
index af884808f2..0000000000
@@ -1,52 +0,0 @@
-From f011501e719e0042fc6ca29ac7b33e8a14562246 Mon Sep 17 00:00:00 2001
-From: "mark.yang" <[email protected]>
-Date: Tue, 1 Apr 2025 19:45:01 +0900
-Subject: [PATCH] fix cstdint error with gcc-15.0.1
-
-* see more details:
-  http://errors.yoctoproject.org/Errors/Details/850148/
-    TOPDIR/tmp/work/core2-64-oe-linux/sqlite-orm/1.5/git/examples/synchronous.cpp:7:5: error: 'uint16_t' does not name a type
-        7 |     uint16_t src_port;
-        |     ^~~~~~~~
-    TOPDIR/tmp/work/core2-64-oe-linux/sqlite-orm/1.5/git/examples/synchronous.cpp:3:1: note: 'uint16_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
-        2 | #include <sqlite_orm/sqlite_orm.h>
-    +++ |+#include <cstdint>
-        3 | #include <string>
-
-While this was backported from 6a96d1cec4(Explicitly included <cstdint> in examples and unit tests),
-since it was a commit made in v1.9, only synchronous.cpp was modified as other files do not exist in the current version.
-
-Signed-off-by: mark.yang <[email protected]>
-
-Upstream-Status: Backport [6a96d1c Explicitly included <cstdint> in examples and unit tests]
----
- examples/synchronous.cpp | 11 ++++++-----
- 1 file changed, 6 insertions(+), 5 deletions(-)
-
-diff --git a/examples/synchronous.cpp b/examples/synchronous.cpp
-index d10da13d..b103b48c 100644
---- a/examples/synchronous.cpp
-+++ b/examples/synchronous.cpp
-@@ -1,15 +1,16 @@
- 
- #include <sqlite_orm/sqlite_orm.h>
-+#include <cstdint>
- #include <string>
- 
- struct Query {
-     std::string src_ip;
--    uint16_t src_port;
--    uint16_t txn_id;
--    uint32_t tv_sec;
--    uint32_t tv_usec;
-+    std::uint16_t src_port;
-+    std::uint16_t txn_id;
-+    std::uint32_t tv_sec;
-+    std::uint32_t tv_usec;
-     std::string name;
--    uint16_t type;
-+    std::uint16_t type;
- };
- 
- int main(int, char **) {
-
meta-oe/recipes-devtools/sqlite-orm/sqlite-orm_1.9.1.bb renamed from meta-oe/recipes-devtools/sqlite-orm/sqlite-orm_1.5.bb +3 -4
similarity index 68%
rename from meta-oe/recipes-devtools/sqlite-orm/sqlite-orm_1.5.bb
rename to meta-oe/recipes-devtools/sqlite-orm/sqlite-orm_1.9.1.bb
index ee203f83e2..a4da31ebc7 100644
@@ -1,19 +1,18 @@
 SUMMARY = "SQLite ORM light header only library for modern C++"
 HOMEPAGE = "https://github.com/fnc12/sqlite_orm"
 LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=3b5bf5ee8bb16d8e19359efe11bdc3f2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4ae09d45eac4aa08d013b5f2e01c67f6"
 
 inherit cmake
 
 DEPENDS += "sqlite3"
 
-SRCREV = "e8a9e9416f421303f4b8970caab26dadf8bae98b"
+SRCREV = "5f1a2ce84a3d72711b4f0a440fdaba977868ae67"
 SRC_URI = " \
     git://github.com/fnc12/sqlite_orm;protocol=https;branch=master \
-    file://0001-fix-cstdint-error-with-gcc-15.0.1.patch \
 "
 
-EXTRA_OECMAKE += "-DSqliteOrm_BuildTests=OFF -DLIB_INSTALL_DIR=${libdir} \
+EXTRA_OECMAKE += "-DBUILD_TESTING=OFF -DLIB_INSTALL_DIR=${libdir} \
                   -DCMAKE_INSTALL_DIR=${libdir}/cmake \
                   -DPKGCONFIG_INSTALL_DIR=${libdir}/pkgconfig"
 
Signature · 1 line
2.43.0
author
#4 lore raw

PATCH 5/5 linux-serial-test: Add patch for CMake 4+ compatibility

In reply to Alper Ak

Fix:

| CMake Error at CMakeLists.txt:4 (cmake_minimum_required):
|   Compatibility with CMake < 3.5 has been removed from CMake.
|
|   Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
|   to tell CMake that the project requires at least <min> but has been updated
|   to work with policies introduced by <max> or earlier.
|
|   Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
|
|
| -- Configuring incomplete, errors occurred!
---
 .../0001-allow-build-with-cmake-4.patch       | 43 +++++++++++++++++++
 .../linux-serial-test_git.bb                  |  3 +-
 2 files changed, 45 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-test/linux-serial-test/linux-serial-test/0001-allow-build-with-cmake-4.patch
meta-oe/recipes-test/linux-serial-test/linux-serial-test/0001-allow-build-with-cmake-4.patch new file +43 -0
new file mode 100644
index 0000000000..0b67ad03b1
@@ -0,0 +1,43 @@
+From 83ec3d72913cbdee0c0f27fe74f77bf2ef1d1901 Mon Sep 17 00:00:00 2001
+From: Alper Ak <[email protected]>
+Date: Thu, 10 Jul 2025 14:11:22 +0300
+Subject: [PATCH] cmake: Set minimum required version to 3.5 for CMake 4+
+ compatibility
+
+Fix:
+
+| CMake Error at CMakeLists.txt:4 (cmake_minimum_required):
+|   Compatibility with CMake < 3.5 has been removed from CMake.
+|
+|   Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
+|   to tell CMake that the project requires at least <min> but has been updated
+|   to work with policies introduced by <max> or earlier.
+|
+|   Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
+|
+|
+| -- Configuring incomplete, errors occurred!
+
+Upstream-Status: Submitted [https://github.com/cbrake/linux-serial-test/pull/60]
+
+Signed-off-by: Alper Ak <[email protected]>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 10e3968..4ce6ef1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: MIT
+ 
+ project(linux-serial-test C)
+-cmake_minimum_required(VERSION 2.6)
++cmake_minimum_required(VERSION 3.5)
+ add_executable(linux-serial-test linux-serial-test.c)
+ target_link_libraries(linux-serial-test rt)
+ install(TARGETS linux-serial-test DESTINATION bin)
+-- 
+2.43.0
+
meta-oe/recipes-test/linux-serial-test/linux-serial-test_git.bb +2 -1
index c617cf09a3..a451db2a76 100644
@@ -3,7 +3,8 @@ HOMEPAGE = "https://github.com/cbrake/linux-serial-test"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSES/MIT;md5=544799d0b492f119fa04641d1b8868ed"
 
-SRC_URI = "git://github.com/cbrake/linux-serial-test.git;protocol=https;branch=master"
+SRC_URI = "git://github.com/cbrake/linux-serial-test.git;protocol=https;branch=master \
+        file://0001-allow-build-with-cmake-4.patch"
 
 PV = "0+git"
 SRCREV = "2ee61484167eab846f7b7c565284d7c350d738d3"
Signature · 1 line
2.43.0
#5 lore raw

Re: [oe] [meta-openembedded][PATCH 5/5] linux-serial-test: Add patch for CMake 4+ compatibility

your patch has been accepted. Please bump the SRCREV instead here now ?

Quoted 97 lines · Alper Ak via lists.openembedded.org

Fix:

| CMake Error at CMakeLists.txt:4 (cmake_minimum_required):
|   Compatibility with CMake < 3.5 has been removed from CMake.
|
|   Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
|   to tell CMake that the project requires at least <min> but has been updated
|   to work with policies introduced by <max> or earlier.
|
|   Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
|
|
| -- Configuring incomplete, errors occurred!
---
 .../0001-allow-build-with-cmake-4.patch       | 43 +++++++++++++++++++
 .../linux-serial-test_git.bb                  |  3 +-
 2 files changed, 45 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-test/linux-serial-test/linux-serial-test/0001-allow-build-with-cmake-4.patch
meta-oe/recipes-test/linux-serial-test/linux-serial-test/0001-allow-build-with-cmake-4.patch new file +43 -0
new file mode 100644
index 0000000000..0b67ad03b1
@@ -0,0 +1,43 @@
+From 83ec3d72913cbdee0c0f27fe74f77bf2ef1d1901 Mon Sep 17 00:00:00 2001
+From: Alper Ak <[email protected]>
+Date: Thu, 10 Jul 2025 14:11:22 +0300
+Subject: [PATCH] cmake: Set minimum required version to 3.5 for CMake 4+
+ compatibility
+
+Fix:
+
+| CMake Error at CMakeLists.txt:4 (cmake_minimum_required):
+|   Compatibility with CMake < 3.5 has been removed from CMake.
+|
+|   Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
+|   to tell CMake that the project requires at least <min> but has been updated
+|   to work with policies introduced by <max> or earlier.
+|
+|   Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
+|
+|
+| -- Configuring incomplete, errors occurred!
+
+Upstream-Status: Submitted [https://github.com/cbrake/linux-serial-test/pull/60]
+
+Signed-off-by: Alper Ak <[email protected]>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 10e3968..4ce6ef1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: MIT
+
+ project(linux-serial-test C)
+-cmake_minimum_required(VERSION 2.6)
++cmake_minimum_required(VERSION 3.5)
+ add_executable(linux-serial-test linux-serial-test.c)
+ target_link_libraries(linux-serial-test rt)
+ install(TARGETS linux-serial-test DESTINATION bin)
+--
+2.43.0
+
meta-oe/recipes-test/linux-serial-test/linux-serial-test_git.bb +2 -2
index c617cf09a3..a451db2a76 100644
@@ -3,7 +3,8 @@ HOMEPAGE = "https://github.com/cbrake/linux-serial-test"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSES/MIT;md5=544799d0b492f119fa04641d1b8868ed"
 
-SRC_URI = "git://github.com/cbrake/linux-serial-test.git;protocol=https;branch=master"
+SRC_URI = "git://github.com/cbrake/linux-serial-test.git;protocol=https;branch=master \
+        file://0001-allow-build-with-cmake-4.patch"
 
 PV = "0+git"
 SRCREV = "2ee61484167eab846f7b7c565284d7c350d738d3"
--

2.43.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#118420): https://lists.openembedded.org/g/openembedded-devel/message/118420
Mute This Topic: https://lists.openembedded.org/mt/114086939/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#6 lore raw

Re: [oe] [meta-openembedded][PATCH 5/5] linux-serial-test: Add patch for CMake 4+ compatibility

Sent a v2 patch ->
https://lists.openembedded.org/g/openembedded-devel/message/118430

Khem Raj <[email protected]>, 11 Tem 2025 Cum, 04:58 tarihinde şunu yazdı:

Quoted 102 lines

your patch has been accepted. Please bump the SRCREV instead here now ?

Quoted 97 lines · Alper Ak via lists.openembedded.org

Fix:

| CMake Error at CMakeLists.txt:4 (cmake_minimum_required):
|   Compatibility with CMake < 3.5 has been removed from CMake.
|
|   Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
|   to tell CMake that the project requires at least <min> but has been updated
|   to work with policies introduced by <max> or earlier.
|
|   Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
|
|
| -- Configuring incomplete, errors occurred!
---
 .../0001-allow-build-with-cmake-4.patch       | 43 +++++++++++++++++++
 .../linux-serial-test_git.bb                  |  3 +-
 2 files changed, 45 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-test/linux-serial-test/linux-serial-test/0001-allow-build-with-cmake-4.patch
meta-oe/recipes-test/linux-serial-test/linux-serial-test/0001-allow-build-with-cmake-4.patch new file +43 -0
new file mode 100644
index 0000000000..0b67ad03b1
@@ -0,0 +1,43 @@
+From 83ec3d72913cbdee0c0f27fe74f77bf2ef1d1901 Mon Sep 17 00:00:00 2001
+From: Alper Ak <[email protected]>
+Date: Thu, 10 Jul 2025 14:11:22 +0300
+Subject: [PATCH] cmake: Set minimum required version to 3.5 for CMake 4+
+ compatibility
+
+Fix:
+
+| CMake Error at CMakeLists.txt:4 (cmake_minimum_required):
+|   Compatibility with CMake < 3.5 has been removed from CMake.
+|
+|   Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
+|   to tell CMake that the project requires at least <min> but has been updated
+|   to work with policies introduced by <max> or earlier.
+|
+|   Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
+|
+|
+| -- Configuring incomplete, errors occurred!
+
+Upstream-Status: Submitted [https://github.com/cbrake/linux-serial-test/pull/60]
+
+Signed-off-by: Alper Ak <[email protected]>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 10e3968..4ce6ef1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: MIT
+
+ project(linux-serial-test C)
+-cmake_minimum_required(VERSION 2.6)
++cmake_minimum_required(VERSION 3.5)
+ add_executable(linux-serial-test linux-serial-test.c)
+ target_link_libraries(linux-serial-test rt)
+ install(TARGETS linux-serial-test DESTINATION bin)
+--
+2.43.0
+
meta-oe/recipes-test/linux-serial-test/linux-serial-test_git.bb +2 -2
index c617cf09a3..a451db2a76 100644
@@ -3,7 +3,8 @@ HOMEPAGE = "https://github.com/cbrake/linux-serial-test"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSES/MIT;md5=544799d0b492f119fa04641d1b8868ed"
 
-SRC_URI = "git://github.com/cbrake/linux-serial-test.git;protocol=https;branch=master"
+SRC_URI = "git://github.com/cbrake/linux-serial-test.git;protocol=https;branch=master \
+        file://0001-allow-build-with-cmake-4.patch"
 
 PV = "0+git"
 SRCREV = "2ee61484167eab846f7b7c565284d7c350d738d3"
--

2.43.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#118420): https://lists.openembedded.org/g/openembedded-devel/message/118420
Mute This Topic: https://lists.openembedded.org/mt/114086939/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-