Imported Upstream version 3.17.1
[platform/upstream/cmake.git] / Help / variable / CMAKE_DEFAULT_CONFIGS.rst
1 CMAKE_DEFAULT_CONFIGS
2 ---------------------
3
4 Specifies a :ref:`semicolon-separated list <CMake Language Lists>` of configurations
5 to build for a target in ``build.ninja`` if no ``:<Config>`` suffix is specified in
6 the :generator:`Ninja Multi-Config` generator. If it is set to ``all``, all
7 configurations from :variable:`CMAKE_CROSS_CONFIGS` are used. If it is not
8 specified, it defaults to :variable:`CMAKE_DEFAULT_BUILD_TYPE`.
9
10 For example, if you set :variable:`CMAKE_DEFAULT_BUILD_TYPE` to ``Release``,
11 but set :variable:`CMAKE_DEFAULT_CONFIGS` to ``Debug`` or ``all``, all
12 ``<target>`` aliases in ``build.ninja`` will resolve to ``<target>:Debug`` or
13 ``<target>:all``, but custom commands will still use the ``Release``
14 configuration.
15
16 The value of this variable must be a subset of :variable:`CMAKE_CROSS_CONFIGS`
17 or be the same as :variable:`CMAKE_DEFAULT_BUILD_TYPE`. It must not be
18 specified if :variable:`CMAKE_DEFAULT_BUILD_TYPE` or
19 :variable:`CMAKE_CROSS_CONFIGS` is not used.