Generalize the reordering of CMAKE_CONFIGURATION_TYPES according to CMAKE_BUILD_TYPE.