Remove all links that point to CMake use in a non-modern way.
onqtam opened this issue · comments
Perhaps not right now but in a few months there should be a cleanup - its high time everybody upgraded to at least version 3
For reference, according to https://repology.org/metapackage/cmake/versions, the only (major) distros where the default CMake package is older than 3 are CentOS 6/7 (CMake v2.8.12.2 in both) and Ubuntu 12.04 (CMake v2.8.7; the release is in extended security maintenance until April 2019 for Ubuntu Advantage customers).
Note: Ubuntu 14.04's "cmake" package is at 2.8.12.2, but a "cmake3" package (v3.5.1) is available in the "universe" repository, so I guess that doesn't count.
I think that the old not target based way of using CMake, despite considered a bad practice, is still a valid way, and there is no reason to remove the links. Maybe only adding some kind of deprecated tag or separating them in subsection about CMake 2.x will be enough?
I think old cruft has to go. The target-based way is much more concise and dependencies are better understood and easily maintained.
However I would appreciate links that demonstrate how we can convert the old format to the more modern style. Looking at the CMake code in some Open Source projects I contribute to, it's a pretty daunting task.
It's a sad state of affairs that the official CMake tutorial (https://cmake.org/cmake-tutorial/) uses 2.6.
Discussion about old CMake deprecation on Reddit, with one of the authors of CMake.
That's sad. C++ build / package systems are a real problem (take it from Bjarne Stroustrup, not me), and in desperate need of modernizing.
Why don't they allow us to deprecate bad/ugly commands by specifying it as a flag? :(
@gajop another way is to employ static analysis on CMake files. We do this in our company to continuously check ~1000 files and report violations (e.g. non-modern).
We use cmake_check for that purpose. The tool will grow but you can already scan a full tree and report forbidden usage.