mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-23 14:48:19 -05:00
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:
@@ -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:
|
||||
|
||||
@@ -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",
|
||||
|
||||
+1491
-406
File diff suppressed because it is too large
Load Diff
@@ -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.
|
||||
Reference in New Issue
Block a user