cmake: Add CMAKE_BUILD_TYPE and CMAKE_CONFIGURATION_TYPES env vars
When CMAKE_BUILD_TYPE
or CMAKE_CONFIGURATION_TYPES
is not explicitly specified while creating a new build tree, check for an environment variable of the same name.
Issue: #20983
Fixes: #19247 (closed)