diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-09 15:35:54 -0400 |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-09 15:35:54 -0400 |
commit | 94c955e508daa0ed84290cc1d3e946a74fde0e40 (patch) | |
tree | d0d68c36ee4bfe43f2638b9d3813a4accc1ccda0 /Help | |
parent | d6af1e83bc1fa7f8dcdeadcf57a91d8e5469dae8 (diff) | |
download | cmake-94c955e508daa0ed84290cc1d3e946a74fde0e40.tar.gz |
Tests: Test the CMakePresets.json example in the documentation
Diffstat (limited to 'Help')
-rw-r--r-- | Help/manual/cmake.1.rst | 27 | ||||
-rw-r--r-- | Help/manual/presets/example.json | 23 |
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" + } + } + } + ] +} |