Explorar o código

Help: Document when CMAKE_BUILD_TYPE and CMAKE_CONFIGURATION_TYPES are set

Fixes: #19247
Brad King %!s(int64=4) %!d(string=hai) anos
pai
achega
6986a382a9

+ 5 - 0
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.

+ 4 - 0
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.