-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[CMake] Set the minimum required version to 3.23 #19941
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
base: master
Are you sure you want to change the base?
Conversation
|
Unfortunately, we still have older CMake versions on the platforms that we still support:
On Windows, I don't know. So I think in practice, that means we can only require CMake 3.23+ when Ubuntu 22.04 is end-of-life in two years 🙁 By the way, so far our strategy has been to just use the same minimum CMake version as LLVM. |
Test Results 21 files 21 suites 3d 13h 5m 10s ⏱️ Results for commit f0bf16d. ♻️ This comment has been updated with latest results. |
Question: wouldn't it be an option to ask those users to install cmake from snap or from the official cmake PPA in that corner case? |
|
Thanks, but it seems cmake is not found in the Ubu22 image |
|
AFAIK, we never force users to take another version of CMake than the one installed by default on the distros. That's what defines the minimal version of CMake. At least it was like this so far. @dpiparo can correct me if I'm wrong |
That's just an effect of the incremental build I guess
Yes, that's what we have done so far, but maybe at some point we should discuss if we should keep it like that when Ubuntu doesn't update it's CMake version in 5 years at all. Even RedHat does that. The only thing that I changed now was to install a newer CMake version on the Ubuntu 22.04 CI image, which is independent of what we require from our users. |
|
@ferdymercury, you have any idea what is going on with all these failures? Maybe it would help to rebase the commit on master and push again to this PR branch? |
f441fa0 to
10f29c1
Compare
|
Force-pushing didn't help. It might be the underlying call to cmake_policy(3.23) causes issues.? I checked in https://man.archlinux.org/man/cmake-policies.7.en#Policies_Introduced_by_CMake_3.23 Not sure if we need to change anything else in our CMakeLists around these lines: |
|
I can reproduce the failure locally on Ubuntu22 (only after clearing full build dir) The problem is from 3.20 to 3.21: This works: This or higher fails: So maybe related with https://man.archlinux.org/man/cmake-policies.7.en#CMP0126 |
This version of CMake was released in March 2022 https://github.com/Kitware/CMake/releases/tag/v3.23.0 This version is required to use FILE_SETs, which could help towards root-project#16327 and root-project#18419. Since cmake_minimum_required updates the cmake_policy from 3.20 to 3.23, we need to take care of a change that happened from 3.20 to 3.21 that leads to an error in the CheckCompiler CMake module, so set the proper policy flag to old to avoid that error on some platforms.
10f29c1 to
f0bf16d
Compare
|
Fixed now. |
This version of CMake was released in March 2022
https://github.com/Kitware/CMake/releases/tag/v3.23.0
This version is required to use FILE_SETs, which could help towards #16327 and #18419.