summaryrefslogtreecommitdiff
path: root/Help/variable
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-10-18 13:18:12 -0400
committerBrad King <brad.king@kitware.com>2022-10-18 14:10:41 -0400
commite0075799ed97951c62f749eae671cefb62b2e694 (patch)
tree9318b6e6ae68f4c05ace515f31e6838744d1e471 /Help/variable
parent787fc8caa8c46b7c29e05c9b367f8e85665845d4 (diff)
downloadcmake-e0075799ed97951c62f749eae671cefb62b2e694.tar.gz
Help: Clarify how language-specific flag environment values are used
Previous the wording could be interpreted to mean that the environment variables like `CXXFLAGS` are used exclusively to initialize the corresponding cache entries like `CMAKE_CXX_FLAGS`. State clearly that the value will be used in combination with builtin defaults. Issue: #23956
Diffstat (limited to 'Help/variable')
-rw-r--r--Help/variable/CMAKE_LANG_FLAGS.rst10
1 files changed, 9 insertions, 1 deletions
diff --git a/Help/variable/CMAKE_LANG_FLAGS.rst b/Help/variable/CMAKE_LANG_FLAGS.rst
index 2784397ac2..4b39b1deff 100644
--- a/Help/variable/CMAKE_LANG_FLAGS.rst
+++ b/Help/variable/CMAKE_LANG_FLAGS.rst
@@ -5,7 +5,9 @@ Flags for all build types.
``<LANG>`` flags used regardless of the value of :variable:`CMAKE_BUILD_TYPE`.
-This is initialized for each language from environment variables:
+For each language, if this variable is not defined, it is initialized
+and stored in the cache using values from environment variables in
+combination with CMake's builtin defaults for the toolchain:
* ``CMAKE_C_FLAGS``:
Initialized by the :envvar:`CFLAGS` environment variable.
@@ -15,6 +17,12 @@ This is initialized for each language from environment variables:
Initialized by the :envvar:`CUDAFLAGS` environment variable.
* ``CMAKE_Fortran_FLAGS``:
Initialized by the :envvar:`FFLAGS` environment variable.
+* ``CMAKE_CSharp_FLAGS``:
+ Initialized by the :envvar:`CSFLAGS` environment variable.
+* ``CMAKE_HIP_FLAGS``:
+ Initialized by the :envvar:`HIPFLAGS` environment variable.
+* ``CMAKE_ISPC_FLAGS``:
+ Initialized by the :envvar:`ISPCFLAGS` environment variable.
This value is a command-line string fragment. Therefore, multiple options
should be separated by spaces, and options with spaces should be quoted.