Keeping a CMake project maintainable
When maintaining a CMake project over a long time, there are often a few tasks that regularly come up. There are the usual things, such as new files being added to the project or versions of dependencies increasing, which are usually relatively trivial to handle with CMake. Then, there are things such as adding new toolchains or platforms for cross-compiling, and lastly, there are updates to CMake itself, when new features such as presets are available.
Regularly updating CMake and making use of new features can help keep projects maintainable. While it is often not practical to update every single new version, checking for new big features of CMake and using them when they are released may make projects easier to maintain. For example, the introduction of CMake presets in version 3.19 of CMake is such a feature that has the potential to make many complicated CMakeLists.txt
files much simpler.
Keeping dependencies up to date and under control...