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
Consider upgrading CMake to latest release #8201
Comments
As far as I'm concerned, we should (at least!) be compatible with the packages that come with Debian stable. As of right now (Debian Buster), that is CMake 3.13. To support oldstable (which would be recommended, imo), that would be 3.7. There's also likely going to be issues in future with whatever version of cmake VS 2019 is bundled with, as it likely won't be updated often either. TL;DR Updating and/or installing a dependency is not necessarily trivial |
CMake is a build-only dependency and does not end up in generated packages.
I did not find any official information on which version of CMake is bundled with visual studio. I found this post which mentions Visual Studio 16.3.2 shipping CMake 3.15.3.
The CPack Debian Generator was updated in releases 3.6, 3.7, 3.10, 3.13, 3.16. |
Guess what. Of course, Debian itself doesn't upgrade major versions of packages on the same distro, but the fact remains, I don't want to ask users to have to add a PPA/package repo just to build OTTD. |
I did some more digging regarding the current Debian packages, so please correct me if I am wrong.
CPack is only necessary to generate the separate set of Debian packages provided in the OpenTTD download section. The latter is then what the item in the original CMake PR referred to. This then boils down to the usual baseline question.
I understand the argument, but this only affects developers. Using a separate version of CMake really only involves extracting an archive. Everything works out of the box and even extending PATH isn't required. |
Maybe @matthijskooijman has an opinion about this. |
question: what exactly is this issue suggesting? bump the minimum required CMake version? users can use whatever version they want as long as it's higher than 3.5, no action required on the part of the maintainers... |
Yes, the issue suggests to bump the minimum required CMake version as high as possible/feasible. |
Development dependencies should always be kept at the lowest version as possible, without hurting development itself (which makes this very subjective). You want developers to be able to jump in and start coding, without having to upgrade all the latest versions of all the dependencies all the time. This would drive away contributors, instead of pulling them in. There is a balance at play here, and that is always a bit difficult to navigate. The current minimum required CMake version was picked when we switched to CMake, and so far we haven't seen any new features that makes it worth switching to a newer version for us. Sure there are the odds bits and pieces, but nothing worth making everyone go through the motions. So in that respect we fully comply with your request: our minimum required CMake version is as high as possible/feasible to us ;) The most likely case the minimum required version would be bumped, is when we introduce a new (game) feature that is a lot easier to build with a newer version. To give a hypothetical example: say, we want to use libcurl, and CMake 3.20 (to be released) makes that 2 lines of code instead of 300 lines of custom code. That is a moment increasing the minimum required version is worth considering. Till that time, we are not going to bump anything for the sake of bumping. If you have anything specific in mind, feel free to create a Pull Request (can be a draft, if you want to feel the waters) which shows us how that looks. For CMake specific, we will have targets that require a lot newer CMake in order to build OpenTTD correctly, for example the newest Mac OS ARM. It will not build correctly on CMake 3.18 and below (if I am not mistaken). But these limitations are OS specific, and are due to bugs of CMake. It does not give sufficient reason for us to bump the minimum required version for all OSes. As @LordAro pointed out, OpenTTD still builds fine on Ubuntu 16.04 without dragging in any PPA. I see no reason, and no argument is given in this thread, to change this. We can be convinced otherwise, but it needs more than "bumping for the sake of bumping!" :) Hope you understand ;) |
Rational
OpenTTD is an application with no dependants. Thus only CI, packagers and developers ever need to configure the build system.
Installing the latest CMake is as easy as downloading and extracting an archive.
Windows is also not an issue as CMake needs to be installed by hand anyhow, so there is no reason to install an old version.
Upsides
Downside
One more trivial step to get started to develop OpenTTD.
The text was updated successfully, but these errors were encountered: