CMake has a CMAKE_BUILD_TYPE
option for predefined build types. The build type affects
optimization and whether the result of the build is
debuggable. Those used by MySQL are
RelWithDebInfo
or Debug
.
RelWithDebInfo
(optimizations are on, debug info is generated) is used in MySQL by default.Debug
(optimizations are off, debug info is generated) is used if theWITH_DEBUG
option is set.CMAKE_BUILD_TYPE
is not set when custom compile flags are used (see Section 4.4.6.2, “How to Specify Compilers and Compiler Flags”).