diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-12 18:03:40 +0000 |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-10-12 14:04:41 -0400 |
commit | 55fce4425f2576bb43da44a2bd3715b7dac9b4cd (patch) | |
tree | edc942009f470bc76489b0d81efcc6701b23a6c0 /Help | |
parent | 6437343c9174f756246ae45aedeccfb58ef2109f (diff) | |
parent | 94c955e508daa0ed84290cc1d3e946a74fde0e40 (diff) | |
download | cmake-55fce4425f2576bb43da44a2bd3715b7dac9b4cd.tar.gz |
Merge topic 'cmake-presets-documentation-fix' into release-3.19
94c955e508 Tests: Test the CMakePresets.json example in the documentation
d6af1e83bc Help: Fix documentation of CMakePresets.json's cacheVariables
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5353
Diffstat (limited to 'Help')
-rw-r--r-- | Help/manual/cmake.1.rst | 28 | ||||
-rw-r--r-- | Help/manual/presets/example.json | 23 |
2 files changed, 25 insertions, 26 deletions
diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst index 0f00f5327a..b345db0490 100644 --- a/Help/manual/cmake.1.rst +++ b/Help/manual/cmake.1.rst @@ -174,32 +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": [ - { - "name": "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" + } + } + } + ] +} |