`CMAKE_BUILD_TYPE` defaults to `Debug` on windows
I am not sure if this is due to a specific generator, so far I've tried with Ninja
single-config. I have noticed that it populates the cache variable:
//Choose the type of build, options are: None Debug Release RelWithDebInfo
// MinSizeRel ...
CMAKE_BUILD_TYPE:STRING=Debug
Compared to on unix where it's empty:
//Choose the type of build, options are: None Debug Release RelWithDebInfo
// MinSizeRel ...
CMAKE_BUILD_TYPE:STRING=
But interestingly, if I add the lines:
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif ()
project(...
This actually changes the configuration to Release. So there seems to be some inconsistencies in the flows.