diff options
author | Brad King <brad.king@kitware.com> | 2020-02-28 16:31:58 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-02-28 16:32:07 (GMT) |
commit | f18c72815b78d230957b6862faf4a136edcd7b9c (patch) | |
tree | 60ece43430a314644088cff8fc45ca9614f2e865 /Help | |
parent | 9afd5f0d3296194694fb05232a4da17b059b77d8 (diff) | |
parent | c794b70f194bcff6f06971767f18473da13950e3 (diff) | |
download | CMake-f18c72815b78d230957b6862faf4a136edcd7b9c.zip CMake-f18c72815b78d230957b6862faf4a136edcd7b9c.tar.gz CMake-f18c72815b78d230957b6862faf4a136edcd7b9c.tar.bz2 |
Merge topic 'ninja-multi-variable-shuffle-again'
c794b70f19 Ninja Multi-Config: Always generate build.ninja
9590c3a400 Generator: Don't allow Ninja Multi-Config variables on other generators
7a63dafafb Ninja Multi-Config: Remove "NMC" from variable names
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4403
Diffstat (limited to 'Help')
-rw-r--r-- | Help/generator/Ninja Multi-Config.rst | 41 | ||||
-rw-r--r-- | Help/manual/cmake-variables.7.rst | 6 | ||||
-rw-r--r-- | Help/variable/CMAKE_CROSS_CONFIGS.rst (renamed from Help/variable/CMAKE_NMC_CROSS_CONFIGS.rst) | 4 | ||||
-rw-r--r-- | Help/variable/CMAKE_DEFAULT_BUILD_TYPE.rst (renamed from Help/variable/CMAKE_NMC_DEFAULT_BUILD_FILE_CONFIG.rst) | 4 | ||||
-rw-r--r-- | Help/variable/CMAKE_DEFAULT_CONFIGS.rst (renamed from Help/variable/CMAKE_NMC_DEFAULT_CONFIGS.rst) | 4 |
5 files changed, 30 insertions, 29 deletions
diff --git a/Help/generator/Ninja Multi-Config.rst b/Help/generator/Ninja Multi-Config.rst index 11c59f2..1f68535 100644 --- a/Help/generator/Ninja Multi-Config.rst +++ b/Help/generator/Ninja Multi-Config.rst @@ -12,9 +12,10 @@ multiple configurations at once with :variable:`CMAKE_CONFIGURATION_TYPES` instead of only one configuration with :variable:`CMAKE_BUILD_TYPE`. One ``build-<Config>.ninja`` file will be generated for each of these configurations (with ``<Config>`` being the configuration name.) These files -are intended to be run with ``ninja -f build-<Config>.ninja``. No -``build.ninja`` file is generated by default (see below for how to generate -it.) +are intended to be run with ``ninja -f build-<Config>.ninja``. A +``build.ninja`` file is also generated, using the configuration from either +:variable:`CMAKE_DEFAULT_BUILD_TYPE` or the first item from +:variable:`CMAKE_CONFIGURATION_TYPES`. ``cmake --build . --config <Config>`` will always use ``build-<Config>.ninja`` to build. If no ``--config`` argument is specified, ``cmake --build .`` will @@ -35,7 +36,7 @@ The ``Ninja Multi-Config`` generator recognizes the following variables: Specifies the total set of configurations to build. See the variable's documentation for more information. -:variable:`CMAKE_NMC_CROSS_CONFIGS` +:variable:`CMAKE_CROSS_CONFIGS` Specifies a :ref:`semicolon-separated list <CMake Language Lists>` of configurations available from all ``build-<Config>.ninja`` files. This variable activates cross-config mode. @@ -49,36 +50,36 @@ The ``Ninja Multi-Config`` generator recognizes the following variables: The value of this variable must be a subset of :variable:`CMAKE_CONFIGURATION_TYPES`. -:variable:`CMAKE_NMC_DEFAULT_BUILD_FILE_CONFIG` +:variable:`CMAKE_DEFAULT_BUILD_TYPE` Specifies the configuration to use by default in a ``build.ninja`` file. If - this variable is specified, a ``build.ninja`` file is generated which uses - build rules from ``build-<Config>.ninja`` by default. All custom commands are - executed with this configuration. If the variable is not specified, no - ``build.ninja`` file is generated. + this variable is specified, ``build.ninja`` uses build rules from + ``build-<Config>.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`. -:variable:`CMAKE_NMC_DEFAULT_CONFIGS` +:variable:`CMAKE_DEFAULT_CONFIGS` Specifies a :ref:`semicolon-separated list <CMake Language Lists>` of configurations to build for a target in ``build.ninja`` if no ``:<Config>`` suffix is specified. If it is set to ``all``, all - configurations from :variable:`CMAKE_NMC_CROSS_CONFIGS` are used. If + configurations from :variable:`CMAKE_CROSS_CONFIGS` are used. If it is not specified, it defaults to - :variable:`CMAKE_NMC_DEFAULT_BUILD_FILE_CONFIG`. + :variable:`CMAKE_DEFAULT_BUILD_TYPE`. For example, if you set - :variable:`CMAKE_NMC_DEFAULT_BUILD_FILE_CONFIG` to ``Release``, but - set :variable:`CMAKE_NMC_DEFAULT_CONFIGS` to ``Debug`` or ``all``, + :variable:`CMAKE_DEFAULT_BUILD_TYPE` to ``Release``, but + set :variable:`CMAKE_DEFAULT_CONFIGS` to ``Debug`` or ``all``, all ``<target>`` aliases in ``build.ninja`` will resolve to ``<target>:Debug`` or ``<target>:all``, but custom commands will still use the ``Release`` configuration. The value of this variable must be a subset of - :variable:`CMAKE_NMC_CROSS_CONFIGS` or be the same as - :variable:`CMAKE_NMC_DEFAULT_BUILD_FILE_CONFIG`. It must not be - specified if :variable:`CMAKE_NMC_DEFAULT_BUILD_FILE_CONFIG` or - :variable:`CMAKE_NMC_CROSS_CONFIGS` is not used. + :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. Consider the following example: @@ -104,8 +105,8 @@ This would build the ``Debug`` configuration of ``generator``, which would be used to generate ``generated.c``, which would be used to build the ``Debug`` configuration of ``generated``. -But if :variable:`CMAKE_NMC_CROSS_CONFIGS` is set to ``all``, and you -run the following instead: +But if :variable:`CMAKE_CROSS_CONFIGS` is set to ``all``, and you run the +following instead: .. code-block:: shell diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 1023a66..a639b5d 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -372,11 +372,14 @@ Variables that Control the Build /variable/CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY /variable/CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG /variable/CMAKE_CONFIG_POSTFIX + /variable/CMAKE_CROSS_CONFIGS /variable/CMAKE_CTEST_ARGUMENTS /variable/CMAKE_CUDA_SEPARABLE_COMPILATION /variable/CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS /variable/CMAKE_CUDA_RUNTIME_LIBRARY /variable/CMAKE_DEBUG_POSTFIX + /variable/CMAKE_DEFAULT_BUILD_TYPE + /variable/CMAKE_DEFAULT_CONFIGS /variable/CMAKE_DISABLE_PRECOMPILE_HEADERS /variable/CMAKE_ENABLE_EXPORTS /variable/CMAKE_EXE_LINKER_FLAGS @@ -428,9 +431,6 @@ Variables that Control the Build /variable/CMAKE_MODULE_LINKER_FLAGS_INIT /variable/CMAKE_MSVCIDE_RUN_PATH /variable/CMAKE_MSVC_RUNTIME_LIBRARY - /variable/CMAKE_NMC_CROSS_CONFIGS - /variable/CMAKE_NMC_DEFAULT_BUILD_FILE_CONFIG - /variable/CMAKE_NMC_DEFAULT_CONFIGS /variable/CMAKE_NINJA_OUTPUT_PATH_PREFIX /variable/CMAKE_NO_BUILTIN_CHRPATH /variable/CMAKE_NO_SYSTEM_FROM_IMPORTED diff --git a/Help/variable/CMAKE_NMC_CROSS_CONFIGS.rst b/Help/variable/CMAKE_CROSS_CONFIGS.rst index 6eb6494..c850af2 100644 --- a/Help/variable/CMAKE_NMC_CROSS_CONFIGS.rst +++ b/Help/variable/CMAKE_CROSS_CONFIGS.rst @@ -1,5 +1,5 @@ -CMAKE_NMC_CROSS_CONFIGS -------------------------------- +CMAKE_CROSS_CONFIGS +------------------- Specifies a :ref:`semicolon-separated list <CMake Language Lists>` of configurations available from all ``build-<Config>.ninja`` files in the diff --git a/Help/variable/CMAKE_NMC_DEFAULT_BUILD_FILE_CONFIG.rst b/Help/variable/CMAKE_DEFAULT_BUILD_TYPE.rst index c0eab56..62ee0d2 100644 --- a/Help/variable/CMAKE_NMC_DEFAULT_BUILD_FILE_CONFIG.rst +++ b/Help/variable/CMAKE_DEFAULT_BUILD_TYPE.rst @@ -1,5 +1,5 @@ -CMAKE_NMC_DEFAULT_BUILD_FILE_CONFIG -------------------------------------------- +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 diff --git a/Help/variable/CMAKE_NMC_DEFAULT_CONFIGS.rst b/Help/variable/CMAKE_DEFAULT_CONFIGS.rst index e2bb017..86d8a5a 100644 --- a/Help/variable/CMAKE_NMC_DEFAULT_CONFIGS.rst +++ b/Help/variable/CMAKE_DEFAULT_CONFIGS.rst @@ -1,5 +1,5 @@ -CMAKE_NMC_DEFAULT_CONFIGS ---------------------------------- +CMAKE_DEFAULT_CONFIGS +--------------------- Specifies a :ref:`semicolon-separated list <CMake Language Lists>` of configurations to build for a target in ``build.ninja`` if no ``:<Config>`` suffix is specified in |