From 6986a382a912f4b982f4b20a6e04ff1d773ef1eb Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 29 Jun 2021 13:55:26 -0400 Subject: Help: Document when CMAKE_BUILD_TYPE and CMAKE_CONFIGURATION_TYPES are set Fixes: #19247 --- Help/variable/CMAKE_BUILD_TYPE.rst | 5 +++++ Help/variable/CMAKE_CONFIGURATION_TYPES.rst | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/Help/variable/CMAKE_BUILD_TYPE.rst b/Help/variable/CMAKE_BUILD_TYPE.rst index dd892fa..b29678a 100644 --- a/Help/variable/CMAKE_BUILD_TYPE.rst +++ b/Help/variable/CMAKE_BUILD_TYPE.rst @@ -24,5 +24,10 @@ 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. 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..15fea4b 100644 --- a/Help/variable/CMAKE_CONFIGURATION_TYPES.rst +++ b/Help/variable/CMAKE_CONFIGURATION_TYPES.rst @@ -8,5 +8,9 @@ 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. The default value is generator-specific. + See :variable:`CMAKE_BUILD_TYPE` for specifying the configuration with single-config generators. -- cgit v0.12