Preset JSON scheme allows missing BinaryDir/generator for previous versions of the scheme
The following CMakePresets.json
file validates against the current schema.json
file:
{
"version": 1,
"cmakeMinimumRequired": {
"major": 3,
"minor": 19,
"patch": 0
},
"configurePresets": [
{
"name": "somePreset",
"cacheVariables": {
"HELLO_WORLD": "ON"
}
}
]
}
But using it with e.g. cmake 3.20.5 fails because binaryDir
and generator
are missing from the somePreset
preset.
The actual cmake error is:
CMake Error: Could not read presets from /home/maarten/project: Invalid preset
Imho, this error is very non-descriptive.