summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-10-19 18:01:40 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2020-10-21 14:37:08 (GMT)
commit920d18004731c97a828a937e2074b6882ffeb20d (patch)
tree300fb2ca724c39e0f9498736f8b48d0a5bf62fa0 /Help
parentec3b3d2c2f16397b9a40f79a9783f3d207088b93 (diff)
downloadCMake-920d18004731c97a828a937e2074b6882ffeb20d.zip
CMake-920d18004731c97a828a937e2074b6882ffeb20d.tar.gz
CMake-920d18004731c97a828a937e2074b6882ffeb20d.tar.bz2
CMakePresets.json: Allow boolean for cache variable value
Fixes: #21327
Diffstat (limited to 'Help')
-rw-r--r--Help/manual/cmake-presets.7.rst10
-rw-r--r--Help/manual/presets/schema.json16
2 files changed, 20 insertions, 6 deletions
diff --git a/Help/manual/cmake-presets.7.rst b/Help/manual/cmake-presets.7.rst
index 93e1151..7040ad5 100644
--- a/Help/manual/cmake-presets.7.rst
+++ b/Help/manual/cmake-presets.7.rst
@@ -176,9 +176,10 @@ Format
``cacheVariables``
An optional map of cache variables. The key is the variable name (which
- may not be an empty string), and the value is either ``null``, a string
- representing the value of the variable (which supports macro expansion),
- or an object with the following fields:
+ may not be an empty string), and the value is either ``null``, a boolean
+ (which is equivalent to a value of ``"TRUE"`` or ``"FALSE"`` and a type
+ of ``BOOL``), a string representing the value of the variable (which
+ supports macro expansion), or an object with the following fields:
``type``
@@ -186,7 +187,8 @@ Format
``value``
- A required string representing the value of the variable. This field
+ A required string or boolean representing the value of the variable.
+ A boolean is equivalent to ``"TRUE"`` or ``"FALSE"``. This field
supports macro expansion.
Cache variables are inherited through the ``inherits`` field, and the
diff --git a/Help/manual/presets/schema.json b/Help/manual/presets/schema.json
index 564c94c..ba4568f 100644
--- a/Help/manual/presets/schema.json
+++ b/Help/manual/presets/schema.json
@@ -119,6 +119,10 @@
"description": "Setting a variable to null causes it to not be set, even if a value was inherited from another preset."
},
{
+ "type": "boolean",
+ "description": "A boolean representing the value of the variable. Equivalent to \"TRUE\" or \"FALSE\"."
+ },
+ {
"type": "string",
"description": "A string representing the value of the variable (which supports macro expansion)."
},
@@ -131,8 +135,16 @@
"description": "An optional string representing the type of the variable. It should be BOOL, FILEPATH, PATH, STRING, or INTERNAL."
},
"value": {
- "type": "string",
- "description": "A required string representing the value of the variable. This field supports macro expansion."
+ "anyOf": [
+ {
+ "type": "boolean",
+ "description": "A required boolean representing the value of the variable. Equivalent to \"TRUE\" or \"FALSE\"."
+ },
+ {
+ "type": "string",
+ "description": "A required string representing the value of the variable. This field supports macro expansion."
+ }
+ ]
}
},
"required": [