Mac check cmake version6/30/2023 (I would even suggest starting there) The you would indeed not have the latest and greatest buildfeatures CMake can offer. You can pick the subset of programs directly available between all your target system and then be done with it, sure. I think the conclusion is that you can't have your cake and eat it too. I personally never had a problem with CMake portability on Linux or Windows, but that's just the CMake advocate in me. One thing I can say is that Makefiles are pretty much the exact opposite of portable, because they require some really weird installs on Windows. I have no experience with autoconfig other than a specific project I had to port to Windows, which was a pain. Portable code acknowledges the different environments and handles them gracefully. Portable code doesn't live in an isolated environment. It's not hard to get a decently modern Python install either. It's like saying "Why do people rely on Python 3.6+ when Python's been around for 22 years now?" Well, because format string literals are a thing, and they're extremely useful, and 3.6 has been around for a while. CMake lets you use generators for any system, including newer build tools like Ninja (another great selling point of Meson). configure & make? There's a reason so few people want to use autotools/autoconf anymore: the syntax is terrible, it doesn't plug well into IDE build systems, and it doesn't play very well with Windows. Also, it's very easy to get a newer version of CMake prebuilt for your system: it's infinitely backwards compatible, so there's no reason not to.Īs for why not use. Most projects don't rely on truly bleeding edge versions either: Many projects I know may rely on CMake 3.13 or higher, which has been out for 3 years now. I do not know if CMake has deprecated support for some platforms, but I would be surprised if that never happens (unfortunately).ĬMake has better functionality that becomes available with newer versions. Installing newer CMake might not always be easy or allowed in all contexts. I did it a few times, and I can not recall that it was particularly painful, but it is still something that is good to avoid.Īnd of course it happens that some of us have to compile code for older platforms. Upgrading important parts of the systems (like CMake definitely is) to newer versions is not always a good idea. In general I try to stay on the version of CMake that shipped with some version of a Linux distribution I use. Staying behind on an older version to support some older platform is usually not a big deal, and the reason for using a build-system like CMake is to keep it as painless as possible to not run the same system like the original developer did. C++ might not be as stable as C, but in general it has great portability.
0 Comments
Leave a Reply. |