From c8fd26eb5723e5c2e9eac949827d5937591a5d69 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Thu, 26 Mar 2020 15:33:48 -0400 Subject: Help: Move Ninja Multi-Config variable details into their respective pages --- Help/generator/Ninja Multi-Config.rst | 40 +++--------------------------- Help/variable/CMAKE_CROSS_CONFIGS.rst | 12 +++++++-- Help/variable/CMAKE_DEFAULT_BUILD_TYPE.rst | 10 ++++++-- Help/variable/CMAKE_DEFAULT_CONFIGS.rst | 16 ++++++++++-- 4 files changed, 35 insertions(+), 43 deletions(-) diff --git a/Help/generator/Ninja Multi-Config.rst b/Help/generator/Ninja Multi-Config.rst index 1f68535..f480eb8 100644 --- a/Help/generator/Ninja Multi-Config.rst +++ b/Help/generator/Ninja Multi-Config.rst @@ -33,53 +33,19 @@ below for how to enable cross-config mode. The ``Ninja Multi-Config`` generator recognizes the following variables: :variable:`CMAKE_CONFIGURATION_TYPES` - Specifies the total set of configurations to build. See the variable's - documentation for more information. + Specifies the total set of configurations to build. :variable:`CMAKE_CROSS_CONFIGS` Specifies a :ref:`semicolon-separated list ` of configurations available from all ``build-.ninja`` files. - This variable activates cross-config mode. - Targets from each config specified in this variable can be built from any - ``build-.ninja`` file. Custom commands will use the configuration - native to ``build-.ninja``. If it is set to ``all``, all - configurations from :variable:`CMAKE_CONFIGURATION_TYPES` are cross-configs. - If it is not specified, or empty, each ``build-.ninja`` file will - only contain build rules for its own configuration. - - The value of this variable must be a subset of - :variable:`CMAKE_CONFIGURATION_TYPES`. :variable:`CMAKE_DEFAULT_BUILD_TYPE` - Specifies the configuration to use by default in a ``build.ninja`` file. If - this variable is specified, ``build.ninja`` uses build rules from - ``build-.ninja`` by default. All custom commands are executed with - this configuration. If the variable is not specified, the first item from - :variable:`CMAKE_CONFIGURATION_TYPES` is used instead. - - The value of this variable must be one of the items from - :variable:`CMAKE_CONFIGURATION_TYPES`. + Specifies the configuration to use by default in a ``build.ninja`` file. :variable:`CMAKE_DEFAULT_CONFIGS` Specifies a :ref:`semicolon-separated list ` of configurations to build for a target in ``build.ninja`` - if no ``:`` suffix is specified. If it is set to ``all``, all - configurations from :variable:`CMAKE_CROSS_CONFIGS` are used. If - it is not specified, it defaults to - :variable:`CMAKE_DEFAULT_BUILD_TYPE`. - - For example, if you set - :variable:`CMAKE_DEFAULT_BUILD_TYPE` to ``Release``, but - set :variable:`CMAKE_DEFAULT_CONFIGS` to ``Debug`` or ``all``, - all ```` aliases in ``build.ninja`` will resolve to - ``:Debug`` or ``:all``, but custom commands will still use - the ``Release`` configuration. - - The value of this variable must be a subset of - :variable:`CMAKE_CROSS_CONFIGS` or be the same as - :variable:`CMAKE_DEFAULT_BUILD_TYPE`. It must not be - specified if :variable:`CMAKE_DEFAULT_BUILD_TYPE` or - :variable:`CMAKE_CROSS_CONFIGS` is not used. + if no ``:`` suffix is specified. Consider the following example: diff --git a/Help/variable/CMAKE_CROSS_CONFIGS.rst b/Help/variable/CMAKE_CROSS_CONFIGS.rst index c850af2..94157f3 100644 --- a/Help/variable/CMAKE_CROSS_CONFIGS.rst +++ b/Help/variable/CMAKE_CROSS_CONFIGS.rst @@ -3,5 +3,13 @@ CMAKE_CROSS_CONFIGS Specifies a :ref:`semicolon-separated list ` of configurations available from all ``build-.ninja`` files in the -:generator:`Ninja Multi-Config` generator. See the generator's -documentation for more details. +:generator:`Ninja Multi-Config` generator. This variable activates +cross-config mode. Targets from each config specified in this variable can be +built from any ``build-.ninja`` file. Custom commands will use the +configuration native to ``build-.ninja``. If it is set to ``all``, all +configurations from :variable:`CMAKE_CONFIGURATION_TYPES` are cross-configs. If +it is not specified, or empty, each ``build-.ninja`` file will only +contain build rules for its own configuration. + +The value of this variable must be a subset of +:variable:`CMAKE_CONFIGURATION_TYPES`. diff --git a/Help/variable/CMAKE_DEFAULT_BUILD_TYPE.rst b/Help/variable/CMAKE_DEFAULT_BUILD_TYPE.rst index 62ee0d2..aa4f82d 100644 --- a/Help/variable/CMAKE_DEFAULT_BUILD_TYPE.rst +++ b/Help/variable/CMAKE_DEFAULT_BUILD_TYPE.rst @@ -2,5 +2,11 @@ CMAKE_DEFAULT_BUILD_TYPE ------------------------ Specifies the configuration to use by default in a ``build.ninja`` file in the -:generator:`Ninja Multi-Config` generator. See the generator's documentation -for more details. +:generator:`Ninja Multi-Config` generator. If this variable is specified, +``build.ninja`` uses build rules from ``build-.ninja`` by default. All +custom commands are executed with this configuration. If the variable is not +specified, the first item from :variable:`CMAKE_CONFIGURATION_TYPES` is used +instead. + +The value of this variable must be one of the items from +:variable:`CMAKE_CONFIGURATION_TYPES`. diff --git a/Help/variable/CMAKE_DEFAULT_CONFIGS.rst b/Help/variable/CMAKE_DEFAULT_CONFIGS.rst index 86d8a5a..84c642a 100644 --- a/Help/variable/CMAKE_DEFAULT_CONFIGS.rst +++ b/Help/variable/CMAKE_DEFAULT_CONFIGS.rst @@ -3,5 +3,17 @@ CMAKE_DEFAULT_CONFIGS Specifies a :ref:`semicolon-separated list ` of configurations to build for a target in ``build.ninja`` if no ``:`` suffix is specified in -the :generator:`Ninja Multi-Config` generator. -See the generator's documentation for more details. +the :generator:`Ninja Multi-Config` generator. If it is set to ``all``, all +configurations from :variable:`CMAKE_CROSS_CONFIGS` are used. If it is not +specified, it defaults to :variable:`CMAKE_DEFAULT_BUILD_TYPE`. + +For example, if you set :variable:`CMAKE_DEFAULT_BUILD_TYPE` to ``Release``, +but set :variable:`CMAKE_DEFAULT_CONFIGS` to ``Debug`` or ``all``, all +```` aliases in ``build.ninja`` will resolve to ``:Debug`` or +``:all``, but custom commands will still use the ``Release`` +configuration. + +The value of this variable must be a subset of :variable:`CMAKE_CROSS_CONFIGS` +or be the same as :variable:`CMAKE_DEFAULT_BUILD_TYPE`. It must not be +specified if :variable:`CMAKE_DEFAULT_BUILD_TYPE` or +:variable:`CMAKE_CROSS_CONFIGS` is not used. -- cgit v0.12