Is it time to raise our required CMake version?
At the moment, our required CMake version is conservatively set to 3.8, and all libraries are recommended to support it. This may be set too low for 2027. The minimum usable Ubuntu on Github Actions is 20.04, which has CMake 3.16. Boost installation requires 3.13. Boost.Python requires 3.14. (These are preexisting requirements, from the very beginning.) Opinions? Does anyone need CMake < 3.13? < 3.16?
-------- Original Message -------- On Sunday, 11/01/26 at 07:37 Peter Dimov via Boost <boost@lists.boost.org> wrote: At the moment, our required CMake version is conservatively set to 3.8, and all libraries are recommended to support it. This may be set too low for 2027. The minimum usable Ubuntu on Github Actions is 20.04, which has CMake 3.16. Boost installation requires 3.13. Boost.Python requires 3.14. (These are preexisting requirements, from the very beginning.) Opinions? Does anyone need CMake < 3.13? < 3.16? 3.16 seems like a good bar. I checked, and the oldest standard support version of Redhat is shipping CMake 3.26. Matt
On 1 Nov 2026 15:36, Peter Dimov via Boost wrote:
At the moment, our required CMake version is conservatively set to 3.8, and all libraries are recommended to support it.
This may be set too low for 2027. The minimum usable Ubuntu on Github Actions is 20.04, which has CMake 3.16.
Boost installation requires 3.13. Boost.Python requires 3.14. (These are preexisting requirements, from the very beginning.)
Opinions? Does anyone need CMake < 3.13? < 3.16?
Just for context, there's this page: https://gitlab.kitware.com/cmake/community/-/wikis/CMake-Versions-on-Linux-D... Although for RHEL the page lists the CMake version that was shipped in the original RHEL release, not including later updates. To me, 3.16 seems fine.
On 01/11/2026 13:36, Peter Dimov via Boost wrote:
At the moment, our required CMake version is conservatively set to 3.8, and all libraries are recommended to support it.
This may be set too low for 2027. The minimum usable Ubuntu on Github Actions is 20.04, which has CMake 3.16.
Boost installation requires 3.13. Boost.Python requires 3.14. (These are preexisting requirements, from the very beginning.)
Opinions? Does anyone need CMake < 3.13? < 3.16?
Is there any technical feature in CMake 3.16 that do you think is useful for building boost? I don't disagree with that, I only want to know if the minimum version upgrade will make the life easier or if the various CMakeLists.txt will remain the same without any code change, apart the version number of course.
Is there any technical feature in CMake 3.16 that do you think is useful for building boost?
I don't disagree with that, I only want to know if the minimum version upgrade will make the life easier or if the various CMakeLists.txt will remain the same without any code change, apart the version number of course. There is one for using CMake 3.13: https://github.com/boostorg/cmake/blob/develop/developer.md
Boost installation support requires CMake 3.13. Even though boost_install will work on earlier CMake versions, you will likely get errors at generate time because the dependencies of your library will lack install support.
3.15 allows installing pdb files A grep for where CMLs enable workarounds/additional features for specific CMake version thresholds shows these counts of checks: 1 3.1. 2 3.6 8 3.10 1 3.11 6 3.12 16 3.13 2 3.14 4 3.15 2 3.18 10 3.19 4 3.23 1 3.27 So 3.13 would allow removing the majority of those checks. From our current usage I don't see much of an advantage of going to 3.16 over 3.13 except that the former is the "native" version of Ubuntu 20.04. The 3.15 checks are in Boost.CMake, 3 of those only for "nicer messages".
Alexander Grund wrote:
The 3.15 checks are in Boost.CMake, 3 of those only for "nicer messages".
It's more than just nicer messages; it enables one to use message(VERBOSE directly, without needing to include BoostMessage. That's useful if, for instance, your CMakeLists.txt file needs to also run standalone.
Daniele Lupo wrote:
On 01/11/2026 13:36, Peter Dimov via Boost wrote:
At the moment, our required CMake version is conservatively set to 3.8, and all libraries are recommended to support it.
This may be set too low for 2027. The minimum usable Ubuntu on Github Actions is 20.04, which has CMake 3.16.
Boost installation requires 3.13. Boost.Python requires 3.14. (These are preexisting requirements, from the very beginning.)
Opinions? Does anyone need CMake < 3.13? < 3.16?
Is there any technical feature in CMake 3.16 that do you think is useful for building boost?
3.16 is mostly notable for being the default on Ubuntu 20.04. From a CMake feature perspective, the one prompting this e-mail (among others) was the failure https://github.com/boostorg/cmake/actions/runs/41333825766/job/125196650425 CMake Error at libs/openmethod/test/CMakeLists.txt:159 (target_precompile_headers): Unknown CMake command "target_precompile_headers". target_precompile_headers requires 3.16. Breaking the Boost configuration phase via using a feature unsupported in early CMake seems common, so the higher we set the baseline, the less this is going to happen.
On 01/11/2026 13:36, Peter Dimov via Boost wrote:
At the moment, our required CMake version is conservatively set to 3.8, and all libraries are recommended to support it.
This may be set too low for 2027. The minimum usable Ubuntu on Github Actions is 20.04, which has CMake 3.16.
Boost installation requires 3.13. Boost.Python requires 3.14. (These are preexisting requirements, from the very beginning.)
Opinions? Does anyone need CMake < 3.13? < 3.16?
Is there any technical feature in CMake 3.16 that do you think is useful for building boost?
I don't disagree with that, I only want to know if the minimum version upgrade will make the life easier or if the various CMakeLists.txt will remain the same without any code change, apart the version number of course.
A couple days ago I implemented an automatic detection for the job in the Boost.CI workflow using a fixed CMake version, intended as a test for the "minimum" CMake version supported. Library maintainers were previously supposed to set that version themselves as an input (not sure anyone did) with the default being very conservatively 3.16 It now reads the CMakeLists and use the declared minimum as the version to test, with at least 3.8 in case anything lower was declared. With that test quickly ran into the point mentioned above: Boost installation requires 3.13! I'd argue, that we should declare this as the minimum in the BoostRoot CML. For consuming projects CMake provides a "FindBoost"module to search for installed Boost libraries and their (hardcoded) dependencies. Since CMake 3.30 [1] they started deprecating this as since 1.70 Boost ships a CMake config file (via B2) providing actual dependencies, so they don't have to check and update them for each release. As for users the missing installation support in earlier CMake versions is only visible via a single(?) line in the configure output (and later missing those config files of course) I'd say we cause more harm than help in claiming support for earlier CMake versions while not providing the (now) essential CMake config files, given the FindBoost deprecation. [1]https://cmake.org/cmake/help/latest/policy/CMP0167.html
participants (5)
-
Alexander Grund -
Andrey Semashev -
Daniele Lupo -
Matt Borland -
Peter Dimov