• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1CMAKE_DEFAULT_CONFIGS
2---------------------
3
4.. versionadded:: 3.17
5
6Specifies a :ref:`semicolon-separated list <CMake Language Lists>` of configurations
7to build for a target in ``build.ninja`` if no ``:<Config>`` suffix is specified in
8the :generator:`Ninja Multi-Config` generator. If it is set to ``all``, all
9configurations from :variable:`CMAKE_CROSS_CONFIGS` are used. If it is not
10specified, it defaults to :variable:`CMAKE_DEFAULT_BUILD_TYPE`.
11
12For example, if you set :variable:`CMAKE_DEFAULT_BUILD_TYPE` to ``Release``,
13but set :variable:`CMAKE_DEFAULT_CONFIGS` to ``Debug`` or ``all``, all
14``<target>`` aliases in ``build.ninja`` will resolve to ``<target>:Debug`` or
15``<target>:all``, but custom commands will still use the ``Release``
16configuration.
17
18The value of this variable must be a subset of :variable:`CMAKE_CROSS_CONFIGS`
19or be the same as :variable:`CMAKE_DEFAULT_BUILD_TYPE`. It must not be
20specified if :variable:`CMAKE_DEFAULT_BUILD_TYPE` or
21:variable:`CMAKE_CROSS_CONFIGS` is not used.
22