summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/manual/cmake-presets.7.rst2
-rw-r--r--Help/manual/presets/example.json2
-rw-r--r--Help/manual/presets/schema.json50
-rw-r--r--Source/cmCMakePresetsGraphReadJSON.cxx2
-rw-r--r--Tests/RunCMake/CMakePresets/IncludeOutsideProjectInclude.json2
-rw-r--r--Tests/RunCMake/CMakePresetsBuild/Good.json.in2
-rw-r--r--Tests/RunCMake/CMakePresetsTest/Good.json.in2
7 files changed, 54 insertions, 8 deletions
diff --git a/Help/manual/cmake-presets.7.rst b/Help/manual/cmake-presets.7.rst
index 31bd9c0..23057b9 100644
--- a/Help/manual/cmake-presets.7.rst
+++ b/Help/manual/cmake-presets.7.rst
@@ -54,7 +54,7 @@ The root object recognizes the following fields:
``version``
A required integer representing the version of the JSON schema.
- The supported versions are ``1``, ``2``, ``3``, and ``4``.
+ The supported versions are ``1``, ``2``, ``3``, ``4``, and ``5``.
``cmakeMinimumRequired``
diff --git a/Help/manual/presets/example.json b/Help/manual/presets/example.json
index a7ec10e..9365c87 100644
--- a/Help/manual/presets/example.json
+++ b/Help/manual/presets/example.json
@@ -1,5 +1,5 @@
{
- "version": 4,
+ "version": 5,
"cmakeMinimumRequired": {
"major": 3,
"minor": 21,
diff --git a/Help/manual/presets/schema.json b/Help/manual/presets/schema.json
index 12f8b5e..ac7b1dd 100644
--- a/Help/manual/presets/schema.json
+++ b/Help/manual/presets/schema.json
@@ -57,6 +57,21 @@
"include": { "$ref": "#/definitions/include"}
},
"additionalProperties": false
+ },
+ {
+ "properties": {
+ "version": {
+ "const": 5,
+ "description": "A required integer representing the version of the JSON schema."
+ },
+ "cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequired"},
+ "vendor": { "$ref": "#/definitions/vendor" },
+ "configurePresets": { "$ref": "#/definitions/configurePresetsV3"},
+ "buildPresets": { "$ref": "#/definitions/buildPresetsV4"},
+ "testPresets": { "$ref": "#/definitions/testPresetsV5"},
+ "include": { "$ref": "#/definitions/include"}
+ },
+ "additionalProperties": false
}
],
"required": [
@@ -821,8 +836,7 @@
"type": "integer",
"description": "An optional integer specifying the maximum width of a test name to output. Equivalent to passing --max-width on the command line."
}
- },
- "additionalProperties": false
+ }
},
"filter": {
"type": "object",
@@ -998,6 +1012,38 @@
]
}
},
+ "testPresetsV5": {
+ "type": "array",
+ "description": "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 5 and higher.",
+ "allOf": [
+ { "$ref": "#/definitions/testPresetsItemsV2" },
+ { "$ref": "#/definitions/testPresetsItemsV3" }
+ ],
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {},
+ "hidden": {},
+ "inherits": {},
+ "configurePreset": {},
+ "vendor": {},
+ "displayName": {},
+ "description": {},
+ "inheritConfigureEnvironment": {},
+ "environment": {},
+ "configuration": {},
+ "overwriteConfigurationFile": {},
+ "output": {},
+ "filter": {},
+ "execution": {},
+ "condition": {}
+ },
+ "required": [
+ "name"
+ ],
+ "additionalProperties": false
+ }
+ },
"testPresetsV3": {
"type": "array",
"description": "An optional array of test preset objects. Used to specify arguments to ctest. Available in version 3 and higher.",
diff --git a/Source/cmCMakePresetsGraphReadJSON.cxx b/Source/cmCMakePresetsGraphReadJSON.cxx
index 85cf5be..8a770b0 100644
--- a/Source/cmCMakePresetsGraphReadJSON.cxx
+++ b/Source/cmCMakePresetsGraphReadJSON.cxx
@@ -33,7 +33,7 @@ using TestPreset = cmCMakePresetsGraph::TestPreset;
using ArchToolsetStrategy = cmCMakePresetsGraph::ArchToolsetStrategy;
constexpr int MIN_VERSION = 1;
-constexpr int MAX_VERSION = 4;
+constexpr int MAX_VERSION = 5;
struct CMakeVersion
{
diff --git a/Tests/RunCMake/CMakePresets/IncludeOutsideProjectInclude.json b/Tests/RunCMake/CMakePresets/IncludeOutsideProjectInclude.json
index f13e55c..ebf106f 100644
--- a/Tests/RunCMake/CMakePresets/IncludeOutsideProjectInclude.json
+++ b/Tests/RunCMake/CMakePresets/IncludeOutsideProjectInclude.json
@@ -1,3 +1,3 @@
{
- "version": 4
+ "version": 5
}
diff --git a/Tests/RunCMake/CMakePresetsBuild/Good.json.in b/Tests/RunCMake/CMakePresetsBuild/Good.json.in
index 568907c..a953f48 100644
--- a/Tests/RunCMake/CMakePresetsBuild/Good.json.in
+++ b/Tests/RunCMake/CMakePresetsBuild/Good.json.in
@@ -1,5 +1,5 @@
{
- "version": 4,
+ "version": 5,
"configurePresets": [
{
"name": "default",
diff --git a/Tests/RunCMake/CMakePresetsTest/Good.json.in b/Tests/RunCMake/CMakePresetsTest/Good.json.in
index 57be5a5..ea20d9d 100644
--- a/Tests/RunCMake/CMakePresetsTest/Good.json.in
+++ b/Tests/RunCMake/CMakePresetsTest/Good.json.in
@@ -1,5 +1,5 @@
{
- "version": 2,
+ "version": 5,
"configurePresets": [
{
"name": "default",