At the risk of taking this too far, I wonder if we should also consider using CMAKE_DEFAULT_BUILD_TYPE
to provide the initial value for CMAKE_BUILD_TYPE
for single-config generators (if not set already)? This could be an opportunity to stop making an empty build type the default on single config generators and instead have it be Debug
(which is what people typically assume it actually is). We could do this under the control of a policy to preserve backward compatibility.