| 1 | From: https://github.com/ceph/ceph/pull/63795
|
| 2 |
|
| 3 | From 8886bdd95387bba8c9fcfe0e2550c5eb430d2a69 Mon Sep 17 00:00:00 2001
|
| 4 | From: Kefu Chai <[email protected]>
|
| 5 | Date: Fri, 13 Jun 2025 16:20:10 +0800
|
| 6 | Subject: [PATCH 1/2] cmake: drop c-ares::c-ares alias
|
| 7 |
|
| 8 | Remove the c-ares::c-ares alias that was causing build failures after
|
| 9 | bumping the minimum CMake version:
|
| 10 |
|
| 11 | ```
|
| 12 | CMake Error at cmake/modules/Findc-ares.cmake:34 (add_library):
|
| 13 | add_library cannot create ALIAS target "c-ares::c-ares" because another
|
| 14 | target with the same name already exists.
|
| 15 | Call Stack (most recent call first):
|
| 16 | src/CMakeLists.txt:463 (_find_package)
|
| 17 | src/seastar/cmake/SeastarDependencies.cmake:136 (find_package)
|
| 18 | src/seastar/CMakeLists.txt:395 (seastar_find_dependencies)`
|
| 19 | ```
|
| 20 |
|
| 21 | The alias was originally added for backward compatibility with Seastar,
|
| 22 | but is no longer needed since the updated Seastar submodule no longer
|
| 23 | references the c-ares::c-ares target.
|
| 24 |
|
| 25 | Signed-off-by: Kefu Chai <[email protected]>
|
| 26 | ---
|
| 27 | cmake/modules/Findc-ares.cmake | 3 ---
|
| 28 | 1 file changed, 3 deletions(-)
|
| 29 |
|
| 30 | diff --git a/cmake/modules/Findc-ares.cmake b/cmake/modules/Findc-ares.cmake
|
| 31 | index 93554ed281460..0e4fcd580127f 100644
|
| 32 | |
| 33 | |
| 34 | @@ -30,9 +30,6 @@ if(c-ares_FOUND)
|
| 35 | IMPORTED_LOCATION "${c-ares_LIBRARY}")
|
| 36 | endif()
|
| 37 |
|
| 38 | - # to be compatible with old Seastar
|
| 39 | - add_library(c-ares::c-ares ALIAS c-ares::cares)
|
| 40 | -
|
| 41 | if(NOT TARGET c-ares::c-ares)
|
| 42 | add_library(c-ares::c-ares ALIAS c-ares::cares)
|
| 43 | endif()
|
| 44 |
|
| 45 | From 469d82a1f387f342797636fdfff84f570b22f928 Mon Sep 17 00:00:00 2001
|
| 46 | From: Kefu Chai <[email protected]>
|
| 47 | Date: Sun, 8 Jun 2025 16:24:51 +0800
|
| 48 | Subject: [PATCH 2/2] cmake: bump minimum required CMake version to 3.22.1
|
| 49 |
|
| 50 | Bump the minimum required CMake version from 3.5 to 3.22.1 in both
|
| 51 | Ceph and embedded dmclock to address deprecation warnings.
|
| 52 |
|
| 53 | CMake 4.0.2 generates deprecation warnings for projects requiring
|
| 54 | versions below 3.10:
|
| 55 |
|
| 56 | ```
|
| 57 | CMake Deprecation Warning at src/dmclock/CMakeLists.txt:1 (cmake_minimum_required):
|
| 58 | Compatibility with CMake < 3.10 will be removed from a future version of
|
| 59 | CMake.
|
| 60 |
|
| 61 | Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
|
| 62 | to tell CMake that the project requires at least <min> but has been updated
|
| 63 | to work with policies introduced by <max> or earlier.
|
| 64 | ```
|
| 65 |
|
| 66 | The upstream CI workflow uses Ubuntu 22.04 (CMake 3.22.1) and CentOS 9
|
| 67 | (CMake 3.26.5), so bumping to 3.22.1 maintains compatibility with our
|
| 68 | supported build environments while enabling access to newer CMake
|
| 69 | features.
|
| 70 |
|
| 71 | Signed-off-by: Kefu Chai <[email protected]>
|
| 72 | ---
|
| 73 | CMakeLists.txt | 2 +-
|
| 74 | src/dmclock/CMakeLists.txt | 2 +-
|
| 75 | 2 files changed, 2 insertions(+), 2 deletions(-)
|
| 76 |
|
| 77 | diff --git a/CMakeLists.txt b/CMakeLists.txt
|
| 78 | index fb1a9f07212e9..fde3fed781a37 100644
|
| 79 | |
| 80 | |
| 81 | @@ -1,4 +1,4 @@
|
| 82 | -cmake_minimum_required(VERSION 3.16)
|
| 83 | +cmake_minimum_required(VERSION 3.22.1)
|
| 84 |
|
| 85 | project(ceph
|
| 86 | VERSION 20.0.0
|
| 87 | diff --git a/src/dmclock/CMakeLists.txt b/src/dmclock/CMakeLists.txt
|
| 88 | index 049ea5e312945..52742e846f8af 100644
|
| 89 | |
| 90 | |
| 91 | @@ -1,4 +1,4 @@
|
| 92 | -cmake_minimum_required(VERSION 3.5.1)
|
| 93 | +cmake_minimum_required(VERSION 3.22.1)
|
| 94 |
|
| 95 | project(dmclock CXX)
|
| 96 |
|