cmake: bump minimum required CMake version to 3.22.1

Bump the minimum required CMake version from 3.5 to 3.22.1 in both
Ceph and embedded dmclock to address deprecation warnings.

CMake 4.0.2 generates deprecation warnings for projects requiring
versions below 3.10:

```
CMake Deprecation Warning at src/dmclock/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  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.
```

The upstream CI workflow uses Ubuntu 22.04 (CMake 3.22.1) and CentOS 9
(CMake 3.26.5), so bumping to 3.22.1 maintains compatibility with our
supported build environments while enabling access to newer CMake
features.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
This commit is contained in:
Kefu Chai
2025-06-08 16:24:51 +08:00
parent 8886bdd953
commit 469d82a1f3
2 changed files with 2 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.22.1)
project(ceph
VERSION 20.0.0

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5.1)
cmake_minimum_required(VERSION 3.22.1)
project(dmclock CXX)