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
cmake: Bump CMake minimum required version up to 3.22 #123
Conversation
Bump CMake minimum required version up to 3.22
CMake 3.19: - The CMAKE_<LANG>_COMPILER variable may now be used to store "mandatory" compiler flags like the CC and other environment variables. CMake 3.21: - The Makefile Generators and the Ninja generator learned to add linker launcher tools along with the linker for C, CXX, OBJC, and OBJCXX languages.
CMake 3.17: - The FindPkgConfig module now extracts include directories prefixed with -isystem into the *_INCLUDE_DIRS variables and INTERFACE_INCLUDE_DIRECTORIES target properties.
CMake 3.20: - The configure_file() command gained FILE_PERMISSIONS options to support using specified permissions.
CMake 3.17: - The CMAKE_CURRENT_FUNCTION variable is now defined inside a function().
Deprecated since CMake 3.20.
CMake 3.21: - cmake gained the --toolchain command-line option to specify a toolchain file.
Concept ACK :) |
Guix build:
|
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.
Concept ACK
I'll perform a cross-build later today, especially due to the removal of the workaround on commit ae5bd32 (cmake/module/CrossPkgConfig.cmake
) not being necessary anymore (even CIs indicate to work fine).
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.
tACK a6a746e
Cross-building for Windows on Ubuntu 22.04 & Ubuntu 22.04 on WSL.
Ran successfully ctest
and test_bitcoin-qt
on both WSL and Windows 11 Pro.
Matches hebasto#123. This also also dev/ci only code.
ACK on bumping the version. I haven't yet looked at the all the cleanups. |
# Centos Stream 8, EOL in May 2024: | ||
# - CMake 3.20.2, http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/ | ||
# Centos Stream 9, EOL in May 2027: | ||
# - CMake 3.26.5, https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/ |
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.
lgtm. Confirmed in a docker:
# dnf install cmake
CentOS Stream 9 - BaseOS 2.8 MB/s | 8.0 MB 00:02
CentOS Stream 9 - AppStream 5.1 MB/s | 19 MB 00:03
CentOS Stream 9 - Extras packages 17 kB/s | 16 kB 00:00
Last metadata expiration check: 0:00:01 ago on Thu Mar 21 18:14:38 2024.
Dependencies resolved.
==============================================================================================================================================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================================================================================================================================
Installing:
cmake x86_64 3.26.5-2.el9 appstream 8.7 M
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.
ACK a6a746e
+31 / -100 ❤️
Matches hebasto#123. This also also dev/ci only code.
11ee058 tidy: remove C compiler check (fanquake) c3a4ea1 tidy: set CMAKE_CXX_STANDARD to 20 (fanquake) 5b690ae tidy: remove terminfo TODO (fanquake) 24410e5 tidy: set minimum CMake to 3.22 (fanquake) Pull request description: See hebasto#123 for the minimum version bump. ACKs for top commit: hebasto: re-ACK 11ee058. Tree-SHA512: 94a508ea24bf17919961bbdbc2e9d17658858e179c3b2017d5932557af32530d9d6aab197453aa5444f5478c417129c5a8e39522ff82bafac0d5a6966c7246d3
Considering the time when the new CMake-based build system will be available for users and bitcoin#29091, it seems reasonable to drop support for CMake versions older than 3.22.
For CMake version availability, please refer to https://repology.org/project/cmake/versions.
If an OS has no supported CMake in its system/default package manager, the user is still able to download it from https://cmake.org/download//
Please refer to commit messages for detailed explanations of code changes.