mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-16 05:26:58 +08:00
Help: Remove unnecessary indentation in cmake-presets(7)
The entire "Format" section had an extra 2 spaces of indentation.
This commit is contained in:
@@ -29,19 +29,19 @@ is using Git, ``CMakePresets.json`` may be tracked, and
|
||||
Format
|
||||
======
|
||||
|
||||
The files are a JSON document with an object as the root:
|
||||
The files are a JSON document with an object as the root:
|
||||
|
||||
.. literalinclude:: presets/example.json
|
||||
.. literalinclude:: presets/example.json
|
||||
:language: json
|
||||
|
||||
The root object recognizes the following fields:
|
||||
The root object recognizes the following fields:
|
||||
|
||||
``version``
|
||||
``version``
|
||||
|
||||
A required integer representing the version of the JSON schema. Currently,
|
||||
the only supported version is 1.
|
||||
|
||||
``cmakeMinimumRequired``
|
||||
``cmakeMinimumRequired``
|
||||
|
||||
An optional object representing the minimum version of CMake needed to
|
||||
build this project. This object consists of the following fields:
|
||||
@@ -58,7 +58,7 @@ Format
|
||||
|
||||
An optional integer representing the patch version.
|
||||
|
||||
``vendor``
|
||||
``vendor``
|
||||
|
||||
An optional map containing vendor-specific information. CMake does not
|
||||
interpret the contents of this field except to verify that it is a map if
|
||||
@@ -67,7 +67,7 @@ Format
|
||||
use ``example.com/ExampleIDE/1.0``. The value of each field can be anything
|
||||
desired by the vendor, though will typically be a map.
|
||||
|
||||
``configurePresets``
|
||||
``configurePresets``
|
||||
|
||||
An optional array of configure preset objects. Each preset may contain the
|
||||
following fields:
|
||||
@@ -285,47 +285,47 @@ Format
|
||||
An optional boolean. Setting this to ``true`` is equivalent to passing
|
||||
``--debug-find`` on the command line.
|
||||
|
||||
As mentioned above, some fields support macro expansion. Macros are
|
||||
recognized in the form ``$<macro-namespace>{<macro-name>}``. All macros are
|
||||
evaluated in the context of the preset being used, even if the macro is in a
|
||||
field that was inherited from another preset. For example, if the ``Base``
|
||||
preset sets variable ``PRESET_NAME`` to ``${presetName}``, and the
|
||||
``Derived`` preset inherits from ``Base``, ``PRESET_NAME`` will be set to
|
||||
``Derived``.
|
||||
As mentioned above, some fields support macro expansion. Macros are
|
||||
recognized in the form ``$<macro-namespace>{<macro-name>}``. All macros are
|
||||
evaluated in the context of the preset being used, even if the macro is in a
|
||||
field that was inherited from another preset. For example, if the ``Base``
|
||||
preset sets variable ``PRESET_NAME`` to ``${presetName}``, and the
|
||||
``Derived`` preset inherits from ``Base``, ``PRESET_NAME`` will be set to
|
||||
``Derived``.
|
||||
|
||||
It is an error to not put a closing brace at the end of a macro name. For
|
||||
example, ``${sourceDir`` is invalid. A dollar sign (``$``) followed by
|
||||
anything other than a left curly brace (``{``) with a possible namespace is
|
||||
interpreted as a literal dollar sign.
|
||||
It is an error to not put a closing brace at the end of a macro name. For
|
||||
example, ``${sourceDir`` is invalid. A dollar sign (``$``) followed by
|
||||
anything other than a left curly brace (``{``) with a possible namespace is
|
||||
interpreted as a literal dollar sign.
|
||||
|
||||
Recognized macros include:
|
||||
Recognized macros include:
|
||||
|
||||
``${sourceDir}``
|
||||
``${sourceDir}``
|
||||
|
||||
Path to the project source directory.
|
||||
|
||||
``${sourceParentDir}``
|
||||
``${sourceParentDir}``
|
||||
|
||||
Path to the project source directory's parent directory.
|
||||
|
||||
``${sourceDirName}``
|
||||
``${sourceDirName}``
|
||||
|
||||
The last filename component of ``${sourceDir}``. For example, if
|
||||
``${sourceDir}`` is ``/path/to/source``, this would be ``source``.
|
||||
|
||||
``${presetName}``
|
||||
``${presetName}``
|
||||
|
||||
Name specified in the preset's ``name`` field.
|
||||
|
||||
``${generator}``
|
||||
``${generator}``
|
||||
|
||||
Generator specified in the preset's ``generator`` field.
|
||||
|
||||
``${dollar}``
|
||||
``${dollar}``
|
||||
|
||||
A literal dollar sign (``$``).
|
||||
|
||||
``$env{<variable-name>}``
|
||||
``$env{<variable-name>}``
|
||||
|
||||
Environment variable with name ``<variable-name>``. The variable name may
|
||||
not be an empty string. If the variable is defined in the ``environment``
|
||||
@@ -338,7 +338,7 @@ Format
|
||||
unexpected results when using inconsistent casing. For best results, keep
|
||||
the casing of environment variable names consistent.
|
||||
|
||||
``$penv{<variable-name>}``
|
||||
``$penv{<variable-name>}``
|
||||
|
||||
Similar to ``$env{<variable-name>}``, except that the value only comes from
|
||||
the parent environment, and never from the ``environment`` field. This
|
||||
@@ -348,7 +348,7 @@ Format
|
||||
is needed because ``$env{<variable-name>}`` does not allow circular
|
||||
references.
|
||||
|
||||
``$vendor{<macro-name>}``
|
||||
``$vendor{<macro-name>}``
|
||||
|
||||
An extension point for vendors to insert their own macros. CMake will not
|
||||
be able to use presets which have a ``$vendor{<macro-name>}`` macro, and
|
||||
|
Reference in New Issue
Block a user