This ensures that most compiler tests are not run with the wrong build type’s flags. The initial c++ checks are an exception to that because many internal CMake variables are unset until a language is selected, so it’s problematic to change our build type before that.
The difference can be seen in build/CMakeFiles/CMakeConfigureLog.yaml
. Before, Debug
was used for many of the earlly checks. After this PR, it’s only the first 2 checks.