diff mbox series

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

Message ID 20250710173827.43239-5-alperyasinak1@gmail.com
State Accepted
Headers show
Series [meta-openembedded,1/5] physfs: Add patch for CMake 4+ compatibility | expand

Commit Message

Alper Ak July 10, 2025, 5:38 p.m. UTC
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!

Signed-off-by: Alper Ak <alperyasinak1@gmail.com>
---
 .../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

Comments

Khem Raj July 11, 2025, 1:58 a.m. UTC | #1
your patch has been accepted. Please bump the SRCREV instead here now ?

On Thu, Jul 10, 2025 at 10:39 AM Alper Ak via lists.openembedded.org
<alperyasinak1=gmail.com@lists.openembedded.org> wrote:
>
> 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!
>
> Signed-off-by: Alper Ak <alperyasinak1@gmail.com>
> ---
>  .../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
>
> diff --git a/meta-oe/recipes-test/linux-serial-test/linux-serial-test/0001-allow-build-with-cmake-4.patch b/meta-oe/recipes-test/linux-serial-test/linux-serial-test/0001-allow-build-with-cmake-4.patch
> new file mode 100644
> index 0000000000..0b67ad03b1
> --- /dev/null
> +++ b/meta-oe/recipes-test/linux-serial-test/linux-serial-test/0001-allow-build-with-cmake-4.patch
> @@ -0,0 +1,43 @@
> +From 83ec3d72913cbdee0c0f27fe74f77bf2ef1d1901 Mon Sep 17 00:00:00 2001
> +From: Alper Ak <alperyasinak1@gmail.com>
> +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 <alperyasinak1@gmail.com>
> +---
> + 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
> +
> diff --git a/meta-oe/recipes-test/linux-serial-test/linux-serial-test_git.bb b/meta-oe/recipes-test/linux-serial-test/linux-serial-test_git.bb
> index c617cf09a3..a451db2a76 100644
> --- a/meta-oe/recipes-test/linux-serial-test/linux-serial-test_git.bb
> +++ b/meta-oe/recipes-test/linux-serial-test/linux-serial-test_git.bb
> @@ -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: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Alper Ak July 11, 2025, 6:24 a.m. UTC | #2
Sent a v2 patch ->
https://lists.openembedded.org/g/openembedded-devel/message/118430

Khem Raj <raj.khem@gmail.com>, 11 Tem 2025 Cum, 04:58 tarihinde şunu yazdı:
>
> your patch has been accepted. Please bump the SRCREV instead here now ?
>
> On Thu, Jul 10, 2025 at 10:39 AM Alper Ak via lists.openembedded.org
> <alperyasinak1=gmail.com@lists.openembedded.org> wrote:
> >
> > 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!
> >
> > Signed-off-by: Alper Ak <alperyasinak1@gmail.com>
> > ---
> >  .../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
> >
> > diff --git a/meta-oe/recipes-test/linux-serial-test/linux-serial-test/0001-allow-build-with-cmake-4.patch b/meta-oe/recipes-test/linux-serial-test/linux-serial-test/0001-allow-build-with-cmake-4.patch
> > new file mode 100644
> > index 0000000000..0b67ad03b1
> > --- /dev/null
> > +++ b/meta-oe/recipes-test/linux-serial-test/linux-serial-test/0001-allow-build-with-cmake-4.patch
> > @@ -0,0 +1,43 @@
> > +From 83ec3d72913cbdee0c0f27fe74f77bf2ef1d1901 Mon Sep 17 00:00:00 2001
> > +From: Alper Ak <alperyasinak1@gmail.com>
> > +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 <alperyasinak1@gmail.com>
> > +---
> > + 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
> > +
> > diff --git a/meta-oe/recipes-test/linux-serial-test/linux-serial-test_git.bb b/meta-oe/recipes-test/linux-serial-test/linux-serial-test_git.bb
> > index c617cf09a3..a451db2a76 100644
> > --- a/meta-oe/recipes-test/linux-serial-test/linux-serial-test_git.bb
> > +++ b/meta-oe/recipes-test/linux-serial-test/linux-serial-test_git.bb
> > @@ -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: openembedded-devel+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
diff mbox series

Patch

diff --git a/meta-oe/recipes-test/linux-serial-test/linux-serial-test/0001-allow-build-with-cmake-4.patch b/meta-oe/recipes-test/linux-serial-test/linux-serial-test/0001-allow-build-with-cmake-4.patch
new file mode 100644
index 0000000000..0b67ad03b1
--- /dev/null
+++ b/meta-oe/recipes-test/linux-serial-test/linux-serial-test/0001-allow-build-with-cmake-4.patch
@@ -0,0 +1,43 @@ 
+From 83ec3d72913cbdee0c0f27fe74f77bf2ef1d1901 Mon Sep 17 00:00:00 2001
+From: Alper Ak <alperyasinak1@gmail.com>
+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 <alperyasinak1@gmail.com>
+---
+ 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
+
diff --git a/meta-oe/recipes-test/linux-serial-test/linux-serial-test_git.bb b/meta-oe/recipes-test/linux-serial-test/linux-serial-test_git.bb
index c617cf09a3..a451db2a76 100644
--- a/meta-oe/recipes-test/linux-serial-test/linux-serial-test_git.bb
+++ b/meta-oe/recipes-test/linux-serial-test/linux-serial-test_git.bb
@@ -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"