cmake: Allow CMAKE_CONFIGURATION_TYPES to be set by environment variable

When no `CMAKE_CONFIGURATION_TYPES` is explicitly specified while
creating a new build tree, check for an environment variable of the same
name.

Issue: #20983
10 files changed