build: lower CMakePresets.json schema to v3 for older cmake compat (#27)

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>
This commit is contained in:
Ronan Keryell
2026-05-08 12:14:57 -07:00
committed by GitHub
parent a6fa0d6b8a
commit ba603c3175
2 changed files with 11 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{
"version": 6,
"cmakeMinimumRequired": { "major": 3, "minor": 25, "patch": 0 },
"version": 3,
"cmakeMinimumRequired": { "major": 3, "minor": 21, "patch": 0 },
"configurePresets": [
{
"name": "default",