I think the documentation of CMAKE_BUILD_TYPE
already explains that behavior:
Specifies the build type on single-configuration generators.
This variable is only meaningful to single-configuration generators (such as Makefile Generators and
Ninja
) i.e. those which choose a single configuration when CMake runs to generate a build tree as opposed to multi-configuration generators which offer selection of the build configuration within the generated build environment.