WIP: Add Fastbuild generator
Implements Fastbuild generator (#15294).
Needs the following Fastbuild changes:
- https://github.com/fastbuild/fastbuild/pull/671 Reusing PCH files across targets
-
https://github.com/fastbuild/fastbuild/pull/681Merged in the dev branch -
ExecAlwaysShowOutput
in the dev branch (otherwise Fastbuild doesn't output command results)
Current limitations:
- the triggering of CMake regeneration is partially implemented, need to figure out the right way to implement it with fastbuild
- Fastbuild removes empty lines from the output of commands, breaks some tests
- Fastbuild cleans and builds at the same time, it can't do clean without building. This breaks some assumptions in CMake and some tests
TODO:
- Tests to be fixed:
- RunCMake.ClangTidy - output mangling, expected :0:0 is converted to (0,0) (it might be just a versioning difference of clang-tidy?)
- RunCMake.MultiLint - output mangling, expected :0:0 is converted to (0,0), also needs empty lines fix
- RunCMake.ExternalProject - needs empty lines fix and standalone clean
- RunCMake.ctest_labels_for_subprojects - hard to debug, not sure what is wrong
- RunCMake.GoogleTest - it might be the empty line removal of Fastbuild, but it might be something else as well
- Qt5Autogen.RerunRccDepend - needs CMake regeneration
- RunCMake.Configure - needs CMake regeneration
- RunCMake.file - needs CMake regeneration
- Test Linux
- Test Mac OSX
Future work/nice to have:
- distributed compilation
- change cache folder (so it can be shared)
- enable/disable cache
- reduce dependencies between different targets' ObjectLists to improve concurrency
- translate CMake unity builds to Fastbuild native support
- multiconfiguration support like was added to Ninja
- swift support
I have tested this version on Windows, still need to test Mac and Linux.
Edited by Francisco Facioni