hex
(hex)
1
i am struggling to get CMakePresets.json to work.
consider the following CMakePresets.json:
{
"version": 2,
}
the version field is required. When i ran with cmake -S . --preset=default
i received:
CMake Error: Could not read presets from /home/user/test: JSON parse error
my cmake version is 3.20.2
fenrir
(Jakub Zakrzewski)
2
JSON does not allow for trailing commas
hex
(hex)
3
thank you, that was the problem.
i was overlooking the inherits
requirements, too. Below is working:
{
"version": 2,
"configurePresets": [
{
"name": "default",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/default"
}
]
}
thanks for the awesome information.