Merge topic 'preset-comments'

7d2cc6ece6 presets: Allow comments in presets files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9608
This commit is contained in:
Brad King
2024-06-26 12:45:03 +00:00
committed by Kitware Robot
21 changed files with 1749 additions and 408 deletions
+6
View File
@@ -39,6 +39,9 @@ The files are a JSON document with an object as the root:
.. literalinclude:: presets/example.json
:language: json
Preset files specifying version ``10`` or above may include comments using the
key ``$comment`` at any level within the JSON object to provide documentation.
The root object recognizes the following fields:
``$schema``
@@ -81,6 +84,9 @@ The root object recognizes the following fields:
``9``
.. versionadded:: 3.30
``10``
.. versionadded:: 3.31
``cmakeMinimumRequired``
An optional object representing the minimum version of CMake needed to
build this project. This object consists of the following fields:
+7 -1
View File
@@ -1,16 +1,22 @@
{
"version": 6,
"version": 10,
"cmakeMinimumRequired": {
"major": 3,
"minor": 23,
"patch": 0
},
"$comment": "An example CMakePresets.json file",
"include": [
"otherThings.json",
"moreThings.json"
],
"configurePresets": [
{
"$comment": [
"This is a comment row.",
"This is another comment,",
"just because we can do it"
],
"name": "default",
"displayName": "Default Config",
"description": "Default build using Ninja generator",
File diff suppressed because it is too large Load Diff
+5
View File
@@ -0,0 +1,5 @@
preset-comments
---------------
* Preset files may now include comments using the key ``$comment``
at any level within the JSON object to provide documentation.