summaryrefslogtreecommitdiffstats
path: root/Help/variable
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-07-01 15:29:35 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-07-01 15:29:41 (GMT)
commit635a2525642c2e57b197a4a53b8457d6662daf14 (patch)
tree97b17739c156ab5295cb8de0e57a19cb74da14c5 /Help/variable
parenta10ca7f6679eb7a8c24127b5481de6dc4f2bbeb7 (diff)
parentef56eefc9bb9ae0ad23c80c01a3e15086dcf207e (diff)
downloadCMake-635a2525642c2e57b197a4a53b8457d6662daf14.zip
CMake-635a2525642c2e57b197a4a53b8457d6662daf14.tar.gz
CMake-635a2525642c2e57b197a4a53b8457d6662daf14.tar.bz2
Merge topic 'env-init-configs'
ef56eefc9b cmake: Allow CMAKE_CONFIGURATION_TYPES to be set by environment variable e216b9bbd3 cmake: Allow CMAKE_BUILD_TYPE to be set by environment variable 6986a382a9 Help: Document when CMAKE_BUILD_TYPE and CMAKE_CONFIGURATION_TYPES are set e96169a3ec Help: Cross-reference CMAKE_CONFIGURATION_TYPES from CMAKE_BUILD_TYPE 03bd9c4c10 cmMakefile: Add helper to initialize CMAKE_CONFIGURATION_TYPES Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6291
Diffstat (limited to 'Help/variable')
-rw-r--r--Help/variable/CMAKE_BUILD_TYPE.rst9
-rw-r--r--Help/variable/CMAKE_CONFIGURATION_TYPES.rst6
2 files changed, 15 insertions, 0 deletions
diff --git a/Help/variable/CMAKE_BUILD_TYPE.rst b/Help/variable/CMAKE_BUILD_TYPE.rst
index 405f7d5..9ad1481 100644
--- a/Help/variable/CMAKE_BUILD_TYPE.rst
+++ b/Help/variable/CMAKE_BUILD_TYPE.rst
@@ -23,3 +23,12 @@ Note that configuration names are case-insensitive. The value of this
variable will be the same as it is specified when invoking CMake.
For instance, if ``-DCMAKE_BUILD_TYPE=ReLeAsE`` is specified, then the
value of ``CMAKE_BUILD_TYPE`` will be ``ReLeAsE``.
+
+This variable is initialized by the first :command:`project` or
+:command:`enable_language` command called in a project when a new build
+tree is first created. If the :envvar:`CMAKE_BUILD_TYPE` environment
+variable is set, its value is used. Otherwise, a toolchain-specific
+default is chosen when a language is enabled.
+
+See :variable:`CMAKE_CONFIGURATION_TYPES` for specifying the configuration
+with multi-config generators.
diff --git a/Help/variable/CMAKE_CONFIGURATION_TYPES.rst b/Help/variable/CMAKE_CONFIGURATION_TYPES.rst
index 8fcc798..5298a72 100644
--- a/Help/variable/CMAKE_CONFIGURATION_TYPES.rst
+++ b/Help/variable/CMAKE_CONFIGURATION_TYPES.rst
@@ -8,5 +8,11 @@ such as ``Debug``, ``Release``, ``RelWithDebInfo`` etc. This has reasonable
defaults on most platforms, but can be extended to provide other build
types.
+This variable is initialized by the first :command:`project` or
+:command:`enable_language` command called in a project when a new build
+tree is first created. If the :envvar:`CMAKE_CONFIGURATION_TYPES`
+environment variable is set, its value is used. Otherwise, the default
+value is generator-specific.
+
See :variable:`CMAKE_BUILD_TYPE` for specifying the configuration with
single-config generators.