mirror of
https://github.com/sshlien/abcmidi.git
synced 2026-05-30 20:09:29 +00:00
The preset file declared "version": 6 (cmake >= 3.25), causing "Unrecognized 'version' field" on cmake releases as common as the 3.22.1 shipped by Ubuntu 22.04 LTS. None of the v4/v5/v6 schema features are used here -- the file only relies on configurePresets/buildPresets/testPresets with cacheVariables, binaryDir, displayName, output.outputOnFailure, and environment. v3 (cmake >= 3.21) is the lowest schema where "generator" remains optional so cmake can pick a default; v2 would have required adding "generator" to every preset. cmakeMinimumRequired lowered from 3.25 to 3.21 to match. Verified locally that all three presets (default, debug, sanitize) configure, build, and pass ctest --preset default (19/19 tests). Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
67 lines
1.5 KiB
JSON
67 lines
1.5 KiB
JSON
{
|
|
"version": 3,
|
|
"cmakeMinimumRequired": { "major": 3, "minor": 21, "patch": 0 },
|
|
"configurePresets": [
|
|
{
|
|
"name": "default",
|
|
"displayName": "Default (Release)",
|
|
"binaryDir": "${sourceDir}/build/${presetName}",
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": "Release"
|
|
}
|
|
},
|
|
{
|
|
"name": "debug",
|
|
"displayName": "Debug",
|
|
"binaryDir": "${sourceDir}/build/${presetName}",
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": "Debug"
|
|
}
|
|
},
|
|
{
|
|
"name": "sanitize",
|
|
"displayName": "Debug + Sanitizers (ASan + UBSan)",
|
|
"binaryDir": "${sourceDir}/build/${presetName}",
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": "Debug",
|
|
"ABCMIDI_SANITIZERS": "ON"
|
|
}
|
|
}
|
|
],
|
|
"buildPresets": [
|
|
{
|
|
"name": "default",
|
|
"configurePreset": "default"
|
|
},
|
|
{
|
|
"name": "debug",
|
|
"configurePreset": "debug"
|
|
},
|
|
{
|
|
"name": "sanitize",
|
|
"configurePreset": "sanitize"
|
|
}
|
|
],
|
|
"testPresets": [
|
|
{
|
|
"name": "default",
|
|
"configurePreset": "default",
|
|
"output": { "outputOnFailure": true }
|
|
},
|
|
{
|
|
"name": "debug",
|
|
"configurePreset": "debug",
|
|
"output": { "outputOnFailure": true }
|
|
},
|
|
{
|
|
"name": "sanitize",
|
|
"configurePreset": "sanitize",
|
|
"output": { "outputOnFailure": true },
|
|
"environment": {
|
|
"ASAN_OPTIONS": "abort_on_error=1:halt_on_error=1",
|
|
"UBSAN_OPTIONS": "abort_on_error=1:halt_on_error=1:print_stacktrace=1"
|
|
}
|
|
}
|
|
]
|
|
}
|