CMake 3.11 in FreeBSD
The latest release of CMake has landed in FreeBSD. Prior to release we had good contact with KitWare via the bug tracker so there were few surprises left in the actual release. There were still a few last-minute fixes left, in KDE applications no less. Here is a brief summary of changes we made:
- FindQt doesn't match the way FreeBSD ports are built and installed, so we defer to QMake rather than looking for directories,
- FindOpenMP gets a tweak because it won't find the system pthreads library when gcc (for Fortran) is used,
- FindBLAS gets a larger tweak because BLAS may need to link to libgcc_s, and which gcc_s that is needs to be figured out via ldd(1).
Some older patches have gone away because upstream has picked them up. Tweaks downstream, in package-building-terms, of cmake that were necessary:
- check_include_files respects the required libraries, which can be a surprise when the required libraries have been found but not fully plugged into the build (e.g. missing -L flags).
- the order of includes in automoc sources has changed, which reveals places where a C++ header file doesn't actually include all of the headers it needs to fully define the types it uses; previously the include order might implicitly include them and the issue is papered over.
CPack now fully supports producing FreeBSD packages from a build / install tree by default, so for non-ports software which uses CMake, cpack -G FREEBSD
does the right thing. Previously, this was a non-default tweak to CPack as built in FreeBSD ports.
Edit: as of CMake 3.11.0_1, CPack no longer supports producing FreeBSD packages. There were some unexplored corners of the build process that cause build failures when the FreeBSD pkg(8) support is enabled. So it's off again until we shine some more light into those corners.
.. and a PS., CMake 3.11.1 has just been released, which reverts the change to check_include_files which I'd been working around.