FASTBuild.rst 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. FASTBuild
  2. =========
  3. Generates a ``fbuild.bff`` file, which can be used to build the project with
  4. `FASTBuild <https://www.fastbuild.org/docs/home.html>`_.
  5. Usage
  6. -----
  7. Specify the generator when invoking :manual:`cmake(1)`:
  8. .. code-block:: shell
  9. cmake [<options>] -G FASTBuild -B <path-to-build> [-S <path-to-source>]
  10. This writes a FASTBuild configuration file named ``fbuild.bff`` into
  11. ``<path-to-build>``.
  12. .. note::
  13. This generator also produces IDE project files for Visual Studio and Xcode,
  14. which are placed under:
  15. * ``<path-to-build>/VisualStudio`` – Visual Studio solution and projects
  16. * ``<path-to-build>/XCode`` – Xcode workspace and projects
  17. These IDE files can be generated by building ``xcode`` or ``solution`` targets
  18. and will build using FASTBuild as the backend.
  19. Configuration Variables
  20. -----------------------
  21. The following variables can be used to configure this generator:
  22. * :variable:`CMAKE_FASTBUILD_CACHE_PATH`
  23. * :variable:`CMAKE_FASTBUILD_CAPTURE_SYSTEM_ENV`
  24. * :variable:`CMAKE_FASTBUILD_COMPILER_EXTRA_FILES`
  25. * :variable:`CMAKE_FASTBUILD_ENV_OVERRIDES`
  26. * :variable:`CMAKE_FASTBUILD_TRACK_BYPRODUCTS_AS_OUTPUT`
  27. * :variable:`CMAKE_FASTBUILD_USE_LIGHTCACHE`
  28. * :variable:`CMAKE_FASTBUILD_VERBOSE_GENERATOR`
  29. Target Properties
  30. -----------------
  31. The following target properties can be used to fine-tune behavior on a
  32. per-target basis:
  33. * :prop_tgt:`FASTBUILD_CACHING` –
  34. disables caching for a specific target.
  35. * :prop_tgt:`FASTBUILD_DISTRIBUTION` –
  36. disables distributed compilation for a specific target.
  37. Notes
  38. -----
  39. * This generator does not support directories as outputs of custom commands.
  40. If you do specify a directory as an output, it should be marked with the
  41. ``SYMBOLIC`` property to avoid incorrect behavior.
  42. * It is highly advised to use custom commands with only one output.
  43. If multiple outputs are specified, the generator will emit an additional
  44. rule to check the outputs at build time. This adds overhead and is necessary
  45. because FASTBuild natively supports only a single output per custom step.
  46. Example
  47. -------
  48. .. code-block:: shell
  49. cmake [<options>] -G FASTBuild -B <path-to-build> -DCMAKE_BUILD_TYPE=Release
  50. cmake --build <path-to-build> --target my_app
  51. This generates ``fbuild.bff`` in ``<path-to-build>`` and uses FASTBuild
  52. to build the ``my_app`` target.
  53. See Also
  54. --------
  55. * :manual:`cmake-generators(7)`
  56. * `FASTBuild Documentation <https://www.fastbuild.org/docs/documentation.html>`_