summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-06-29 20:58:16 (GMT)
committerBrad King <brad.king@kitware.com>2021-06-30 14:55:40 (GMT)
commitef56eefc9bb9ae0ad23c80c01a3e15086dcf207e (patch)
tree274a1fe332a115cc18061c7c026e367a75c63226 /Help
parente216b9bbd331e77e59634690a2be98f087acaf2c (diff)
downloadCMake-ef56eefc9bb9ae0ad23c80c01a3e15086dcf207e.zip
CMake-ef56eefc9bb9ae0ad23c80c01a3e15086dcf207e.tar.gz
CMake-ef56eefc9bb9ae0ad23c80c01a3e15086dcf207e.tar.bz2
cmake: Allow CMAKE_CONFIGURATION_TYPES to be set by environment variable
When no `CMAKE_CONFIGURATION_TYPES` is explicitly specified while creating a new build tree, check for an environment variable of the same name. Issue: #20983
Diffstat (limited to 'Help')
-rw-r--r--Help/envvar/CMAKE_CONFIGURATION_TYPES.rst11
-rw-r--r--Help/manual/cmake-env-variables.7.rst1
-rw-r--r--Help/release/dev/env-init-configs.rst4
-rw-r--r--Help/variable/CMAKE_CONFIGURATION_TYPES.rst4
4 files changed, 19 insertions, 1 deletions
diff --git a/Help/envvar/CMAKE_CONFIGURATION_TYPES.rst b/Help/envvar/CMAKE_CONFIGURATION_TYPES.rst
new file mode 100644
index 0000000..833aa4a
--- /dev/null
+++ b/Help/envvar/CMAKE_CONFIGURATION_TYPES.rst
@@ -0,0 +1,11 @@
+CMAKE_CONFIGURATION_TYPES
+-------------------------
+
+.. versionadded:: 3.22
+
+.. include:: ENV_VAR.txt
+
+The ``CMAKE_CONFIGURATION_TYPES`` environment variable specifies a
+default value for the :variable:`CMAKE_CONFIGURATION_TYPES` variable
+when there is no explicit configuration given on the first run while
+creating a new build tree.
diff --git a/Help/manual/cmake-env-variables.7.rst b/Help/manual/cmake-env-variables.7.rst
index ab974a0..3db189e 100644
--- a/Help/manual/cmake-env-variables.7.rst
+++ b/Help/manual/cmake-env-variables.7.rst
@@ -31,6 +31,7 @@ Environment Variables that Control the Build
/envvar/CMAKE_APPLE_SILICON_PROCESSOR
/envvar/CMAKE_BUILD_PARALLEL_LEVEL
/envvar/CMAKE_BUILD_TYPE
+ /envvar/CMAKE_CONFIGURATION_TYPES
/envvar/CMAKE_CONFIG_TYPE
/envvar/CMAKE_EXPORT_COMPILE_COMMANDS
/envvar/CMAKE_GENERATOR
diff --git a/Help/release/dev/env-init-configs.rst b/Help/release/dev/env-init-configs.rst
index fe334b7..5c9892d 100644
--- a/Help/release/dev/env-init-configs.rst
+++ b/Help/release/dev/env-init-configs.rst
@@ -3,3 +3,7 @@ env-init-configs
* The :envvar:`CMAKE_BUILD_TYPE` environment variable was added to
provide a default value for the :variable:`CMAKE_BUILD_TYPE` variable.
+
+* The :envvar:`CMAKE_CONFIGURATION_TYPES` environment variable was added to
+ provide a default value for the :variable:`CMAKE_CONFIGURATION_TYPES`
+ variable.
diff --git a/Help/variable/CMAKE_CONFIGURATION_TYPES.rst b/Help/variable/CMAKE_CONFIGURATION_TYPES.rst
index 15fea4b..5298a72 100644
--- a/Help/variable/CMAKE_CONFIGURATION_TYPES.rst
+++ b/Help/variable/CMAKE_CONFIGURATION_TYPES.rst
@@ -10,7 +10,9 @@ 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. The default value is generator-specific.
+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.