cmake-gui doesn't consider a configure preset "valid" unless a generator is specified
The documentation specifically states that the generator
field may be omitted:
In version 3 or above, this field may be omitted to fall back to regular generator discovery procedure.
This minimal configure preset doesn't show as 'valid' in cmake-gui and is disabled.
{
"version": 5,
"cmakeMinimumRequired": {
"major": 3,
"minor": 23,
"patch": 0
},
"configurePresets": [
{
"name": "default",
"displayName": "Configure with default settings"
}
]
}
If I add a generator
field, then cmake-gui considers it valid:
{
"version": 5,
"cmakeMinimumRequired": {
"major": 3,
"minor": 23,
"patch": 0
},
"configurePresets": [
{
"name": "default",
"displayName": "Configure with default settings",
"generator": "Visual Studio 17 2022"
}
]
}
Diagnostics about 'malformed' presets are an area where both the command-line tool and the GUI tool need improvement. The GUI is completely silent about whatever it considers to be the problem and the command-line tool often just says 'invalid' without giving any information about the context of the encountered error.