mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-24 07:08:38 -05:00
Merge topic 'preset-includes-macro-expansion'
1a38ffc656 presets: Expand more macros in the `include` directive
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9108
This commit is contained in:
@@ -78,6 +78,9 @@ The root object recognizes the following fields:
|
||||
``8``
|
||||
.. versionadded:: 3.28
|
||||
|
||||
``9``
|
||||
.. versionadded:: 3.30
|
||||
|
||||
``cmakeMinimumRequired``
|
||||
An optional object representing the minimum version of CMake needed to
|
||||
build this project. This object consists of the following fields:
|
||||
@@ -146,7 +149,9 @@ guaranteed to be provided by the project. ``CMakeUserPresets.json`` may
|
||||
include files from anywhere.
|
||||
|
||||
Starting from version ``7``, the ``include`` field supports
|
||||
`macro expansion`_, but only ``$penv{}`` macro expansion.
|
||||
`macro expansion`_, but only ``$penv{}`` macro expansion. Starting from version
|
||||
``9``, other macro expansions are also available, except for preset specific
|
||||
ones (e.g. ``presetName``), and ``$env{}``.
|
||||
|
||||
Configure Preset
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -124,6 +124,24 @@
|
||||
"include": { "$ref": "#/definitions/include" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"$schema": { "$ref": "#/definitions/$schema" },
|
||||
"version": {
|
||||
"const": 9,
|
||||
"description": "A required integer representing the version of the JSON schema."
|
||||
},
|
||||
"cmakeMinimumRequired": { "$ref": "#/definitions/cmakeMinimumRequired" },
|
||||
"vendor": { "$ref": "#/definitions/vendor" },
|
||||
"configurePresets": { "$ref": "#/definitions/configurePresetsV7" },
|
||||
"buildPresets": { "$ref": "#/definitions/buildPresetsV4" },
|
||||
"testPresets": { "$ref": "#/definitions/testPresetsV6" },
|
||||
"packagePresets": { "$ref": "#/definitions/packagePresetsV6" },
|
||||
"workflowPresets": { "$ref": "#/definitions/workflowPresetsV6" },
|
||||
"include": { "$ref": "#/definitions/include" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
],
|
||||
"required": [
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
preset-includes-macro-expansion
|
||||
-------------------------------
|
||||
|
||||
* :manual:`cmake-presets(7)` files now support schema version ``9``:
|
||||
|
||||
* ``include`` fields now expand all macros except ``$env{}`` and
|
||||
preset-specific macros.
|
||||
Reference in New Issue
Block a user