diff options
author | Alper Ak <alperyasinak1@gmail.com> | 2025-07-08 22:56:28 +0300 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2025-07-09 09:16:07 -0700 |
commit | 081cc6529bc23a18aab3f39756e7d429f68de3ed (patch) | |
tree | 435ff324a24727dc334ad5321cdfdc437732c25d | |
parent | e07430eb449c6b89ec486624f4c332b3ecd46352 (diff) | |
download | meta-openembedded-081cc6529bc23a18aab3f39756e7d429f68de3ed.tar.gz |
libfann: Add patch for CMake 4+ compatibility
Fix:
| CMake Error at CMakeLists.txt:41 (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!
| CMake Error at lib/googletest/CMakeLists.txt:48 (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>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-support/libfann/libfann/0001-allow-build-with-cmake-4.patch | 69 | ||||
-rw-r--r-- | meta-oe/recipes-support/libfann/libfann_git.bb | 3 |
2 files changed, 70 insertions, 2 deletions
diff --git a/meta-oe/recipes-support/libfann/libfann/0001-allow-build-with-cmake-4.patch b/meta-oe/recipes-support/libfann/libfann/0001-allow-build-with-cmake-4.patch new file mode 100644 index 0000000000..db1600f96c --- /dev/null +++ b/meta-oe/recipes-support/libfann/libfann/0001-allow-build-with-cmake-4.patch | |||
@@ -0,0 +1,69 @@ | |||
1 | From a21c8455e2cfc5b19df1e42cd875c471d4e5cf63 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alper Ak <alperyasinak1@gmail.com> | ||
3 | Date: Tue, 8 Jul 2025 19:40:46 +0300 | ||
4 | Subject: [PATCH] cmake: Set minimum required version to 3.5 for CMake 4+ | ||
5 | compatibility | ||
6 | |||
7 | Fix: | ||
8 | |||
9 | | CMake Error at CMakeLists.txt:41 (cmake_minimum_required): | ||
10 | | Compatibility with CMake < 3.5 has been removed from CMake. | ||
11 | | | ||
12 | | Update the VERSION argument <min> value. Or, use the <min>...<max> syntax | ||
13 | | to tell CMake that the project requires at least <min> but has been updated | ||
14 | | to work with policies introduced by <max> or earlier. | ||
15 | | | ||
16 | | Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway. | ||
17 | | | ||
18 | | | ||
19 | | -- Configuring incomplete, errors occurred! | ||
20 | |||
21 | | CMake Error at lib/googletest/CMakeLists.txt:48 (cmake_minimum_required): | ||
22 | | Compatibility with CMake < 3.5 has been removed from CMake. | ||
23 | | | ||
24 | | Update the VERSION argument <min> value. Or, use the <min>...<max> syntax | ||
25 | | to tell CMake that the project requires at least <min> but has been updated | ||
26 | | to work with policies introduced by <max> or earlier. | ||
27 | | | ||
28 | | Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway. | ||
29 | | | ||
30 | | | ||
31 | | -- Configuring incomplete, errors occurred! | ||
32 | |||
33 | Upstream-Status: Submitted [https://github.com/libfann/fann/pull/152] | ||
34 | |||
35 | Signed-off-by: Alper Ak <alperyasinak1@gmail.com> | ||
36 | --- | ||
37 | CMakeLists.txt | 2 +- | ||
38 | lib/googletest/CMakeLists.txt | 2 +- | ||
39 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
40 | |||
41 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
42 | index 1b11d76..7e80be2 100644 | ||
43 | --- a/CMakeLists.txt | ||
44 | +++ b/CMakeLists.txt | ||
45 | @@ -38,7 +38,7 @@ IF(BIICODE) | ||
46 | ENDIF() | ||
47 | ENDIF() | ||
48 | ELSE() | ||
49 | -cmake_minimum_required (VERSION 2.8) | ||
50 | +cmake_minimum_required (VERSION 3.5) | ||
51 | |||
52 | if (NOT DEFINED CMAKE_BUILD_TYPE) | ||
53 | set (CMAKE_BUILD_TYPE Release CACHE STRING "Build type") | ||
54 | diff --git a/lib/googletest/CMakeLists.txt b/lib/googletest/CMakeLists.txt | ||
55 | index 961672a..3762d18 100644 | ||
56 | --- a/lib/googletest/CMakeLists.txt | ||
57 | +++ b/lib/googletest/CMakeLists.txt | ||
58 | @@ -45,7 +45,7 @@ endif() | ||
59 | # ${gtest_BINARY_DIR}. | ||
60 | # Language "C" is required for find_package(Threads). | ||
61 | project(gtest CXX C) | ||
62 | -cmake_minimum_required(VERSION 2.6.2) | ||
63 | +cmake_minimum_required(VERSION 3.5) | ||
64 | |||
65 | if (COMMAND set_up_hermetic_build) | ||
66 | set_up_hermetic_build() | ||
67 | -- | ||
68 | 2.43.0 | ||
69 | |||
diff --git a/meta-oe/recipes-support/libfann/libfann_git.bb b/meta-oe/recipes-support/libfann/libfann_git.bb index 2f68ea95a8..00b2af3829 100644 --- a/meta-oe/recipes-support/libfann/libfann_git.bb +++ b/meta-oe/recipes-support/libfann/libfann_git.bb | |||
@@ -10,9 +10,8 @@ inherit cmake | |||
10 | 10 | ||
11 | SRCREV ?= "7ec1fc7e5bd734f1d3c89b095e630e83c86b9be1" | 11 | SRCREV ?= "7ec1fc7e5bd734f1d3c89b095e630e83c86b9be1" |
12 | SRC_URI = "git://github.com/libfann/fann.git;branch=master;protocol=https \ | 12 | SRC_URI = "git://github.com/libfann/fann.git;branch=master;protocol=https \ |
13 | " | 13 | file://0001-allow-build-with-cmake-4.patch" |
14 | 14 | ||
15 | PV = "2.2.0+git" | 15 | PV = "2.2.0+git" |
16 | 16 | ||
17 | |||
18 | EXTRA_OECMAKE = "-DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')}" | 17 | EXTRA_OECMAKE = "-DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')}" |