summaryrefslogtreecommitdiff
path: root/Help
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-10-09 15:35:54 -0400
committerKyle Edwards <kyle.edwards@kitware.com>2020-10-09 15:35:54 -0400
commit94c955e508daa0ed84290cc1d3e946a74fde0e40 (patch)
treed0d68c36ee4bfe43f2638b9d3813a4accc1ccda0 /Help
parentd6af1e83bc1fa7f8dcdeadcf57a91d8e5469dae8 (diff)
downloadcmake-94c955e508daa0ed84290cc1d3e946a74fde0e40.tar.gz
Tests: Test the CMakePresets.json example in the documentation
Diffstat (limited to 'Help')
-rw-r--r--Help/manual/cmake.1.rst27
-rw-r--r--Help/manual/presets/example.json23
2 files changed, 25 insertions, 25 deletions
diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst
index 0eadff4fd2..b345db0490 100644
--- a/Help/manual/cmake.1.rst
+++ b/Help/manual/cmake.1.rst
@@ -174,31 +174,8 @@ source and build trees and generate a buildsystem:
The files are a JSON document with an object as the root:
- .. code-block:: json
-
- {
- "version": 1,
- "cmakeMinimumRequired": {
- "major": 3,
- "minor": 19,
- "patch": 0
- },
- "configurePresets": [
- {
- "name": "default",
- "displayName": "Default Config",
- "description": "Default build using Ninja generator",
- "generator": "Ninja",
- "binaryDir": "${sourceDir}/build/default",
- "cacheVariables": {
- "MY_CACHE_VARIABLE": {
- "type": "BOOL",
- "value": "OFF"
- }
- }
- }
- ]
- }
+ .. literalinclude:: presets/example.json
+ :language: json
The root object recognizes the following fields:
diff --git a/Help/manual/presets/example.json b/Help/manual/presets/example.json
new file mode 100644
index 0000000000..a299a06b5d
--- /dev/null
+++ b/Help/manual/presets/example.json
@@ -0,0 +1,23 @@
+{
+ "version": 1,
+ "cmakeMinimumRequired": {
+ "major": 3,
+ "minor": 19,
+ "patch": 0
+ },
+ "configurePresets": [
+ {
+ "name": "default",
+ "displayName": "Default Config",
+ "description": "Default build using Ninja generator",
+ "generator": "Ninja",
+ "binaryDir": "${sourceDir}/build/default",
+ "cacheVariables": {
+ "MY_CACHE_VARIABLE": {
+ "type": "BOOL",
+ "value": "OFF"
+ }
+ }
+ }
+ ]
+}