Files
CMake/Help/variable/CMAKE_FASTBUILD_ENV_OVERRIDES.rst
Brad King 5e9722866a Help: Update Sphinx versionadded directives for 4.2 release
Run the script:

    Utilities/Sphinx/update_versions.py --since v4.1.0 --overwrite
2025-10-09 09:38:20 -04:00

33 lines
944 B
ReStructuredText

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