Help/generator/FASTBuild.rst
.. versionadded:: 4.2
Generates a fbuild.bff file, which can be used to build the project with
FASTBuild <https://www.fastbuild.org/docs/home.html>_.
Specify the generator when invoking :manual:cmake(1):
.. code-block:: shell
cmake [<options>] -G FASTBuild -B <path-to-build> [-S <path-to-source>]
This writes a FASTBuild configuration file named fbuild.bff into
<path-to-build>.
.. note::
This generator also produces IDE project files for Visual Studio and Xcode, which are placed under:
<path-to-build>/VisualStudio – Visual Studio solution and projects<path-to-build>/XCode – Xcode workspace and projectsThese IDE files can be generated by building xcode or solution targets
and will build using FASTBuild as the backend.
To enable FASTBuild caching, set the cache path using the
:variable:CMAKE_FASTBUILD_CACHE_PATH variable or the
FASTBUILD_CACHE_PATH environment variable.
Then build with the -cache flag:
.. code-block:: console
cmake --build <path-to-build> -- -cache
The following variables control how compiler nodes are emitted in the generated
fbuild.bff. These settings may affect build determinism, debug info paths,
include handling, and compiler argument formatting:
CMAKE_FASTBUILD_ALLOW_RESPONSE_FILECMAKE_FASTBUILD_CLANG_GCC_UPDATE_XLANG_ARGCMAKE_FASTBUILD_CLANG_REWRITE_INCLUDESCMAKE_FASTBUILD_COMPILER_EXTRA_FILESCMAKE_FASTBUILD_FORCE_RESPONSE_FILECMAKE_FASTBUILD_SOURCE_MAPPINGCMAKE_FASTBUILD_USE_DETERMINISTIC_PATHSCMAKE_FASTBUILD_USE_LIGHTCACHECMAKE_FASTBUILD_USE_RELATIVE_PATHSThe following variables can be used to configure this generator:
CMAKE_FASTBUILD_CACHE_PATHCMAKE_FASTBUILD_CAPTURE_SYSTEM_ENVCMAKE_FASTBUILD_ENV_OVERRIDESCMAKE_FASTBUILD_IDE_ARGSCMAKE_FASTBUILD_TRACK_BYPRODUCTS_AS_OUTPUTCMAKE_FASTBUILD_VERBOSE_GENERATORThe following target properties can be used to fine-tune behavior on a per-target basis:
FASTBUILD_CACHING –
disables caching for a specific target.FASTBUILD_DISTRIBUTION –
disables distributed compilation for a specific target.SYMBOLIC property to avoid incorrect behavior... code-block:: shell
cmake [<options>] -G FASTBuild -B <path-to-build> -DCMAKE_BUILD_TYPE=Release cmake --build <path-to-build> --target my_app
This generates fbuild.bff in <path-to-build> and uses FASTBuild
to build the my_app target.
cmake-generators(7)FASTBuild Documentation <https://www.fastbuild.org/docs/documentation.html>_