From ba603c3175f0b75a236c6417f2ebe39f7e65dd98 Mon Sep 17 00:00:00 2001 From: Ronan Keryell Date: Fri, 8 May 2026 12:14:57 -0700 Subject: [PATCH] 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 --- CMakePresets.json | 4 ++-- doc/CHANGES | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 3e96dcc..4a0ed2a 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -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", diff --git a/doc/CHANGES b/doc/CHANGES index b82d38d..480a6f5 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -15740,3 +15740,12 @@ m4_esyscmd_s([cat VERSION]) so AC_INIT picks it up at autoreconf time "autoreconf -f" before tagging a release so the committed configure script reflects the new VERSION; see the Releasing section in README.md. + +May 7 2026 [RK] + +build: lowered CMakePresets.json schema from v6 to v3 (and +cmakeMinimumRequired from 3.25 to 3.21) so users on older CMake +releases such as the 3.22.1 shipped by Ubuntu 22.04 LTS can use +"cmake --preset" without hitting "Unrecognized 'version' field". No +v4/v5/v6 schema features were in use; v3 covers every field present +in the file.