CMake 3.12 Update on FreeBSD
CMake 3.12 has reached rc1. That means we're testing the update on FreeBSD, and building lots and lots of packages. And, as I've written previously, every CMake update triggers a bunch of interesting software findings.
As a motto, I've got "use it, aggressively improve it" on my website (you can hire me for odd CMake and C++ jobs, too). So hitting compile issues makes me turn to fixing software outside of KDE.
- Spring is a 3D RTS engine, with only a minor CMakeLists fix -- CMake 3.12 is strict about file(GLOB) and the FOLLOW_SYMLINKS keyword, which is documented only for file(GLOB_RECURSE). Since CMake 3.5, probably much earlier, that keyword has been ignored, and now it's an error (this is considered a regression).
- Coin3D is a 3D toolkit, which in the version currently available on FreeBSD, doesn't even use CMake. It hit a bunch of Clang6 compatibility issues, and after some investigation it turns out they had all been fixed already in later releases; I put in a little time to improve FreeBSD compatibility for the next release.
What I found interesting in those two was once again the variety in CMake styles -- "Modern CMake Style" still needs to catch on in many places, and the wider ecosystem. Mantis bug-tracker! Mercurial! I remember being a big Mercurial fan years ago when doing KDE-Solaris and complaining how obtuse git is. (It's still obtuse, but I'm used to it now).
There's another four dozen ports that have fallout from this update; amusingly Kitware's VTK 5 and VTK 6 are among them -- although a first glance tells me that's C++ problems and not CMake problems, actually. (Generally, using NULL in places where you want to write 0; older macro definitions of NULL would re-write to something that could successfully be cast to 0, but clang6 in C++17 mode, the default, uses nullptr which doesn't cast).