-
Notifications
You must be signed in to change notification settings - Fork 28
Fix CMake 4+ compatibility #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e6714a5
ec301b8
0ff4192
8ef3aa4
f7fb02f
e11d9bc
aed931c
8b468aa
9818d6d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| From 4613616542c78090e1271153a44faf21cd927398 Mon Sep 17 00:00:00 2001 | ||
| From: Ilies CHERGUI <ichergui@nvidia.com> | ||
| Date: Tue, 19 Aug 2025 13:13:01 +0100 | ||
| Subject: [PATCH] cmake: Set minimum required version to 3.5 for CMake 4+ | ||
| compatibility | ||
|
|
||
| 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! | ||
|
|
||
| Upstream-Status: Inappropriate [OE-specific] | ||
| Signed-off-by: Ilies CHERGUI <ichergui@nvidia.com> | ||
| --- | ||
| CMakeLists.txt | 2 +- | ||
| 1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
|
||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| index cb9f4f1..78712aa 100644 | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -1,5 +1,5 @@ | ||
| # CMakeLists to build the cnmem library. | ||
| -cmake_minimum_required(VERSION 2.8.8) | ||
| +cmake_minimum_required(VERSION 3.5) | ||
| project(cnmem) | ||
|
|
||
| # We need CUDA to build that library. | ||
| -- | ||
| 2.34.1 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| From 7957c0c1a736be3ce76a486e07fee995039cda13 Mon Sep 17 00:00:00 2001 | ||
| From: Ilies CHERGUI <ichergui@nvidia.com> | ||
| Date: Tue, 19 Aug 2025 14:34:51 +0100 | ||
| Subject: [PATCH 2/2] cmake: Set minimum required version to 3.5 for CMake 4+ | ||
| compatibility | ||
|
|
||
| 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! | ||
|
|
||
| Upstream-Status: Inappropriate [OE-specific] | ||
| Signed-off-by: Ilies CHERGUI <ichergui@nvidia.com> | ||
| --- | ||
| CMakeLists.txt | 2 +- | ||
| 1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
|
||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| index ed9671a..cffe76b 100644 | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -2,7 +2,7 @@ | ||
| # Set minimum version of CMake. Since command 'project' use | ||
| # VERSION sub-option we need at least 3.0. | ||
| # Note: If you use 2.6 or 2.4, God kills a kitten. Seriously. | ||
| -cmake_minimum_required(VERSION 3.2 FATAL_ERROR) | ||
| +cmake_minimum_required(VERSION 3.5 FATAL_ERROR) | ||
|
|
||
| #### | ||
| # Set variables: | ||
| -- | ||
| 2.34.1 | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=f62d4e85ba68a1574b74d97ab8dea9ab" | |
| SRC_URI = " \ | ||
| git://github.com/dmlc/dlpack.git;protocol=https;branch=main;tag=v${PV} \ | ||
| file://0001-update-dlpack-project-version.patch \ | ||
| file://0002-cmake-Set-minimum-required-version-to-3.5-for-CMake-.patch \ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lets backport dmlc/dlpack@5c210da from upstream instead. |
||
| " | ||
| SRCREV = "bbd2f4d32427e548797929af08cfe2a9cbb3cf12" | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| From 92ff749866dc8e826021622f8b8dc59e2a54b3bd Mon Sep 17 00:00:00 2001 | ||
| From: Ilies CHERGUI <ichergui@nvidia.com> | ||
| Date: Tue, 19 Aug 2025 16:12:55 +0100 | ||
| Subject: [PATCH 2/2] cmake: Set minimum required version to 3.5 for CMake 4+ | ||
| compatibility | ||
|
|
||
| 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! | ||
|
|
||
| Upstream-Status: Inappropriate [OE-specific] | ||
| Signed-off-by: Ilies CHERGUI <ichergui@nvidia.com> | ||
| --- | ||
| CMakeLists.txt | 2 +- | ||
| 1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
|
||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| index dcf5685..a404c2d 100644 | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -1,4 +1,4 @@ | ||
| -cmake_minimum_required(VERSION 3.1) | ||
| +cmake_minimum_required(VERSION 3.5) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think if its working, perhaps its worth letting upstream have a look at this patch. |
||
|
|
||
| list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) | ||
|
|
||
| -- | ||
| 2.34.1 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| From 46e0bdcd591d25e13423d5e704388d33b5e5ede1 Mon Sep 17 00:00:00 2001 | ||
| From: Ilies CHERGUI <ichergui@nvidia.com> | ||
| Date: Tue, 19 Aug 2025 15:23:12 +0100 | ||
| Subject: [PATCH 7/7] cmake: Set minimum required version to 3.5 for CMake 4+ | ||
| compatibility | ||
|
|
||
| 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! | ||
|
|
||
| Upstream-Status: Inappropriate [OE-specific] | ||
| Signed-off-by: Ilies CHERGUI <ichergui@nvidia.com> | ||
| --- | ||
| third_party/FP16/CMakeLists.txt | 2 +- | ||
| third_party/NNPACK/CMakeLists.txt | 2 +- | ||
| third_party/gloo/CMakeLists.txt | 2 +- | ||
| third_party/psimd/CMakeLists.txt | 2 +- | ||
| third_party/tensorpipe/third_party/libuv/CMakeLists.txt | 2 +- | ||
| 5 files changed, 5 insertions(+), 5 deletions(-) | ||
|
|
||
| diff --git a/third_party/FP16/CMakeLists.txt b/third_party/FP16/CMakeLists.txt | ||
| index e0d87f86c..1fee16e14 100644 | ||
| --- a/third_party/FP16/CMakeLists.txt | ||
| +++ b/third_party/FP16/CMakeLists.txt | ||
| @@ -1,4 +1,4 @@ | ||
| -CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR) | ||
| +CMAKE_MINIMUM_REQUIRED(VERSION 3.5 FATAL_ERROR) | ||
|
|
||
| INCLUDE(GNUInstallDirs) | ||
|
|
||
| diff --git a/third_party/NNPACK/CMakeLists.txt b/third_party/NNPACK/CMakeLists.txt | ||
| index d808915a4..335073dba 100644 | ||
| --- a/third_party/NNPACK/CMakeLists.txt | ||
| +++ b/third_party/NNPACK/CMakeLists.txt | ||
| @@ -1,4 +1,4 @@ | ||
| -CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR) | ||
| +CMAKE_MINIMUM_REQUIRED(VERSION 3.5 FATAL_ERROR) | ||
|
|
||
| INCLUDE(GNUInstallDirs) | ||
| INCLUDE(CheckCSourceCompiles) | ||
| diff --git a/third_party/gloo/CMakeLists.txt b/third_party/gloo/CMakeLists.txt | ||
| index b0db65e69..e9c66400c 100644 | ||
| --- a/third_party/gloo/CMakeLists.txt | ||
| +++ b/third_party/gloo/CMakeLists.txt | ||
| @@ -1,4 +1,4 @@ | ||
| -cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) | ||
| +cmake_minimum_required(VERSION 3.5 FATAL_ERROR) | ||
|
|
||
| project(gloo CXX C) | ||
|
|
||
| diff --git a/third_party/psimd/CMakeLists.txt b/third_party/psimd/CMakeLists.txt | ||
| index bd69c6202..4ba1fed29 100644 | ||
| --- a/third_party/psimd/CMakeLists.txt | ||
| +++ b/third_party/psimd/CMakeLists.txt | ||
| @@ -1,4 +1,4 @@ | ||
| -CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR) | ||
| +CMAKE_MINIMUM_REQUIRED(VERSION 3.5 FATAL_ERROR) | ||
|
|
||
| INCLUDE(GNUInstallDirs) | ||
|
|
||
| diff --git a/third_party/tensorpipe/third_party/libuv/CMakeLists.txt b/third_party/tensorpipe/third_party/libuv/CMakeLists.txt | ||
| index 09996d2ab..9c0be8c29 100644 | ||
| --- a/third_party/tensorpipe/third_party/libuv/CMakeLists.txt | ||
| +++ b/third_party/tensorpipe/third_party/libuv/CMakeLists.txt | ||
| @@ -1,4 +1,4 @@ | ||
| -cmake_minimum_required(VERSION 3.4) | ||
| +cmake_minimum_required(VERSION 3.5) | ||
| project(libuv LANGUAGES C) | ||
|
|
||
| cmake_policy(SET CMP0057 NEW) # Enable IN_LIST operator | ||
| -- | ||
| 2.34.1 | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,6 +13,7 @@ SRC_URI += " \ | |
| file://0004-Use-native-protobuf-compiler.patch \ | ||
| file://0005-Disable-various-warnings.patch \ | ||
| file://0006-Fixups-for-cross-building-in-OE.patch \ | ||
| file://0007-cmake-Set-minimum-required-version-to-3.5-for-CMake-.patch \ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lets backport - pytorch/pytorch@c2beead |
||
| " | ||
|
|
||
| S = "${UNPACKDIR}/${PN}-v${PV}" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upstream seems to be dormant but it will be good to create a PR for it there as well.