Update CMake to require version 3.21
The current CMake files are set for 3.20 since this is the version that comes with VS 2019 (16.11). Moving to 3.21 as a minimum would clean up the projects and make them more 'modern'.
VS 2022 ships with 3.21 or later.
GitHub Actions windows-2019 runner images and MS-Hosted windows-2019 VM images have newer versions of CMake.
This would require installing a newer CMake for the Developer Command Prompt for VS 2019 if using CMake.
This would include:
-
Use schema version 3 of CMakePresets.json which adds
installDirandtoolchainFilevariables instead of having to set it through cache variables. -
Tests and subtests can use
PROJECT_IS_TOP_LEVELinstead of the current workaround. -
For CMake tests, this also allows the use of
TARGET_RUNTIME_DLLSwithout a guard or fallback.