Home

CMAKECONFIGURATIONTYPES

CMAKE_CONFIGURATION_TYPES is a cached CMake variable that lists the build configurations available for a multi-configuration generator, such as Visual Studio or Xcode. It is meaningful only when the generator supports multiple configurations in a single project. The value is typically a semicolon-separated list of configuration names, for example Debug;Release;MinSizeRel;RelWithDebInfo.

In contrast to multi-configuration generators, single-configuration generators (such as Unix Makefiles or Ninja) do not rely

Setting CMAKE_CONFIGURATION_TYPES is most useful when you want to declare the configurations that a project can

Behavior with common generators: Visual Studio reads CMAKE_CONFIGURATION_TYPES to determine the available project configurations and allows

In practice, use CMAKE_CONFIGURATION_TYPES to document and enable the intended configurations for multi-configuration workflows, while recognizing

on
this
variable
to
select
a
configuration.
For
those
generators,
the
active
configuration
is
chosen
at
configure
time
via
CMAKE_BUILD_TYPE
and
only
one
configuration
is
produced
per
build
directory.
produce
under
a
multi-configuration
generator.
You
can
set
it
before
configuring
the
project,
usually
as
a
cache
entry.
For
example,
you
might
set:
set(CMAKE_CONFIGURATION_TYPES
"Debug;Release;RelWithDebInfo;MinSizeRel"
CACHE
STRING
""
FORCE).
The
exact
effect
depends
on
the
generator;
some
environments
ignore
it
if
it
is
not
applicable.
switching
among
them
in
the
IDE.
Xcode
similarly
exposes
multiple
configurations.
For
other
generators,
this
variable
may
be
ignored,
and
the
build
system
will
rely
on
its
default
configuration
behavior.
that
single-configuration
pipelines
rely
on
CMAKE_BUILD_TYPE.