In CMake Tools extension settings I specified my CMake path:
and built my project with MSVC 2022 first and then switched to MinGW.
Building a project with MSVC 2022
On my machine with installed MSVC 2022 it automatically generated configuration file %LocalAppData%/CMakeTools/cmake-tools-kits.json
:
[
{
"name": "Visual Studio Professional 2022 Release - amd64",
"visualStudio": "04bbaecf",
"visualStudioArchitecture": "x64",
"preferredGenerator": {
"name": "Visual Studio 17 2022",
"platform": "x64",
"toolset": "host=x64"
}
},
{
"name": "Visual Studio Professional 2022 Release - amd64_x86",
"visualStudio": "04bbaecf",
"visualStudioArchitecture": "x64",
"preferredGenerator": {
"name": "Visual Studio 17 2022",
"platform": "win32",
"toolset": "host=x64"
}
},