summaryrefslogtreecommitdiffstats
path: root/Help/variable
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2021-09-21 12:22:59 (GMT)
committerCraig Scott <craig.scott@crascit.com>2021-09-21 12:23:24 (GMT)
commitb8d10c27d12bc1c43056956abfb8b341f50c1124 (patch)
treebff1a1a26e79e13c84517f703d4fdb5b30458962 /Help/variable
parent253f31f5efb27215049c81a0aff4c67b37a378d5 (diff)
downloadCMake-b8d10c27d12bc1c43056956abfb8b341f50c1124.zip
CMake-b8d10c27d12bc1c43056956abfb8b341f50c1124.tar.gz
CMake-b8d10c27d12bc1c43056956abfb8b341f50c1124.tar.bz2
Help: Restructure build type docs and clarify case sensitivity
Fixes: #22591
Diffstat (limited to 'Help/variable')
-rw-r--r--Help/variable/CMAKE_BUILD_TYPE.rst37
-rw-r--r--Help/variable/CMAKE_CONFIGURATION_TYPES.rst18
2 files changed, 22 insertions, 33 deletions
diff --git a/Help/variable/CMAKE_BUILD_TYPE.rst b/Help/variable/CMAKE_BUILD_TYPE.rst
index 9ad1481..bb95436 100644
--- a/Help/variable/CMAKE_BUILD_TYPE.rst
+++ b/Help/variable/CMAKE_BUILD_TYPE.rst
@@ -1,34 +1,21 @@
CMAKE_BUILD_TYPE
----------------
-Specifies the build type on single-configuration generators.
-
-This statically specifies what build type (configuration) will be
-built in this build tree. Possible values are empty, ``Debug``, ``Release``,
-``RelWithDebInfo``, ``MinSizeRel``, ... This variable is only meaningful to
-single-configuration generators (such as :ref:`Makefile Generators` and
-:generator:`Ninja`) i.e. those which choose a single configuration when CMake
-runs to generate a build tree as opposed to multi-configuration generators
-which offer selection of the build configuration within the generated build
-environment. There are many per-config properties and variables
-(usually following clean ``SOME_VAR_<CONFIG>`` order conventions), such as
-``CMAKE_C_FLAGS_<CONFIG>``, specified as uppercase:
-``CMAKE_C_FLAGS_[DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL|...]``. For example,
-in a build tree configured to build type ``Debug``, CMake will see to
-having :variable:`CMAKE_C_FLAGS_DEBUG <CMAKE_<LANG>_FLAGS_DEBUG>` settings get
-added to the :variable:`CMAKE_C_FLAGS <CMAKE_<LANG>_FLAGS>` settings. See
-also :variable:`CMAKE_CONFIGURATION_TYPES`.
-
-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``.
+Specifies the build type on single-configuration generators (e.g.
+:ref:`Makefile Generators` or :generator:`Ninja`). Typical values include
+``Debug``, ``Release``, ``RelWithDebInfo`` and ``MinSizeRel``, but custom
+build types can also be defined.
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.
+default is chosen when a language is enabled. The default value is often
+an empty string, but this is usually not desirable and one of the other
+standard build types is usually more appropriate.
+
+Depending on the situation, the value of this variable may be treated
+case-sensitively or case-insensitively. See :ref:`Build Configurations`
+for discussion of this and other related topics.
-See :variable:`CMAKE_CONFIGURATION_TYPES` for specifying the configuration
-with multi-config generators.
+For multi-config generators, see :variable:`CMAKE_CONFIGURATION_TYPES`.
diff --git a/Help/variable/CMAKE_CONFIGURATION_TYPES.rst b/Help/variable/CMAKE_CONFIGURATION_TYPES.rst
index 5298a72..75ff8a1 100644
--- a/Help/variable/CMAKE_CONFIGURATION_TYPES.rst
+++ b/Help/variable/CMAKE_CONFIGURATION_TYPES.rst
@@ -1,12 +1,11 @@
CMAKE_CONFIGURATION_TYPES
-------------------------
-Specifies the available build types on multi-config generators.
-
-This specifies what build types (configurations) will be available
-such as ``Debug``, ``Release``, ``RelWithDebInfo`` etc. This has reasonable
-defaults on most platforms, but can be extended to provide other build
-types.
+Specifies the available build types (configurations) on multi-config
+generators (e.g. :ref:`Visual Studio <Visual Studio Generators>`,
+:generator:`Xcode`, or :generator:`Ninja Multi-Config`). Typical values
+include ``Debug``, ``Release``, ``RelWithDebInfo`` and ``MinSizeRel``,
+but custom build types can also be defined.
This variable is initialized by the first :command:`project` or
:command:`enable_language` command called in a project when a new build
@@ -14,5 +13,8 @@ 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.
+Depending on the situation, the values in this variable may be treated
+case-sensitively or case-insensitively. See :ref:`Build Configurations`
+for discussion of this and other related topics.
+
+For single-config generators, see :variable:`CMAKE_BUILD_TYPE`.