CMAKE_FASTBUILD_ENV_OVERRIDES.rst 921 B

123456789101112131415161718192021222324252627282930
  1. CMAKE_FASTBUILD_ENV_OVERRIDES
  2. -----------------------------
  3. Allows overriding environment variables in the captured environment written to
  4. ``fbuild.bff``.
  5. Specify a CMake-style list of key=value pairs. These values will override the
  6. corresponding variables in the environment block that FASTBuild uses during
  7. execution of tools (e.g., compilers, linkers, resource compilers, etc.).
  8. This is especially useful for ensuring consistent behavior when tools depend
  9. on environment variables (e.g., overriding ``PATH`` to control tool resolution
  10. for ``rc.exe`` or ``mt.exe``).
  11. Example:
  12. .. code-block:: cmake
  13. set(CMAKE_FASTBUILD_ENV_OVERRIDES
  14. "PATH=C:/MyTools/bin"
  15. "TMP=C:/temp"
  16. "MY_CUSTOM_VAR=some_value"
  17. )
  18. .. note::
  19. This only affects the environment seen by FASTBuild-generated rules.
  20. It does **not** modify the environment in which CMake itself runs.
  21. Defaults to empty (no overrides).