Changing project config type in VS cmake-based project
Hello!
I'm trying to clarify the VS behavior with Cmake projects that use presets, specifically, how do I switch the configuration type of the build. Here's a basic cmakepresets.json:
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 15,
"patch": 0
},
"configurePresets": [
{
"name": "win32",
"generator": "Visual Studio 17 2022",
"architecture": "x64"
}
]
}
When I open the project as a folder with cmakelists.txt, I get the following parameters for the configuration type:
Only "Debug" is available. Although, if I create a project like cmake -B build/win32 --preset win32 I would be able to build it with different --config values that one would expect to be available with CMake. If I open the generated solution in build/win32 with VS, I can see the expected values.
An idea what's happening here and how can I switch between different configuration types when I open a folder as a cmake project with presets?
Thank you,
Aleksandr.