CMAKE_BUILD_TYPE

Specifies the build type on single-configuration generators (e.g.Makefile Generators orNinja). Typical values includeDebug,Release,RelWithDebInfo andMinSizeRel, but custombuild types can also be defined.

This variable is initialized by the firstproject() orenable_language() command called in a project when a new buildtree is first created. If theCMAKE_BUILD_TYPE environmentvariable is set, its value is used. Otherwise, a toolchain-specificdefault is chosen when a language is enabled. The default value is oftenan empty string, but this is usually not desirable and one of the otherstandard build types is usually more appropriate.

Depending on the situation, the value of this variable may be treatedcase-sensitively or case-insensitively. SeeBuild Configurationsfor discussion of this and other related topics.

For multi-config generators, seeCMAKE_CONFIGURATION_TYPES.