Upgrade minimum required CMake version
scheibel opened this issue · 7 comments
Time passed and we should discuss the currently minimum required version of cmake-init.
@Tachi107 argues that 3.5 is a feasible alternative (#112).
Maybe we can and should go even higher.
CMake has had a lot of interesting improvements in it's later versions, superseding some of our own implementations.
At least, we should get rid of the compatibility layer source code.
I'm fine with updating. I'm not on track with new versions of cmake, but in general, I prefer supporting relatively current versions and not trying to keep compatibility with old versions too long. So, let's update :)
When upgrading the minimum required CMake version, we can also work on those issues:
A quick summary of available CMake versions by OS / distribution and distribution channel:
- macOS / Homebrew: CMake 3.25
- macOS / MacPorts: CMake 3.24
- Windows / nuget: CMake 3.15
- Windows / chocolatey: CMake 3.25
- Debian / apt: CMake 3.18
- Ubuntu / apt: CMake 3.22
- Ubuntu / snap: CMake 3.25
As far as I collected data, our main major platforms and major distribution channels allow for a CMake version of 3.15 or higher. If we ignore the out-of-date package in nuget, it's CMake 3.18 or higher.
And as @Tachi107 mentioned, there's always the possibility to grab a pre-built version of CMake or build it from source yourself (https://cmake.org/download/).
I think we can create different branches for different CMake versions. This approach allows users to maintain separate code bases that are compatible with specific CMake versions. By doing so, users who require a lower CMake version can use the appropriate branch while others can work with the latest version.
According to https://lists.debian.org/debian-devel/2023/06/msg00150.html, CMake 3.27 will begin issuing deprecation warning if projects declare a cmake_minimum_required()
version lower than 3.5.
This is a clear indication from the CMake devs that yes, we should bump the minimum required version.