CMake has a
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 (optimizations are on,
debug info is generated) is used in MySQL by default.
Debug (optimizations are off, debug
info is generated) is used if the
WITH_DEBUG option is set.
CMAKE_BUILD_TYPE is not set
when custom compile flags are used (see
Section 188.8.131.52, “How to Specify Compilers and Compiler Flags”).