summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2020-10-23 10:37:47 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-10-23 10:37:56 (GMT)
commit5e1858c0c2d819412f2ce0ff8e681f54df42ffe6 (patch)
tree4f9f893e97b239b4f469159c8bca9e5b5dbc71d2 /Help
parent761dc324e043a504f6cec26b03bd86eb59c48710 (diff)
parent64afabdbcb265acb53a9b8f8cb86465d31f2ca61 (diff)
downloadCMake-5e1858c0c2d819412f2ce0ff8e681f54df42ffe6.zip
CMake-5e1858c0c2d819412f2ce0ff8e681f54df42ffe6.tar.gz
CMake-5e1858c0c2d819412f2ce0ff8e681f54df42ffe6.tar.bz2
Merge topic 'cmake-presets-toolset-arch-config' into release-3.19
64afabdbcb CMakePresets.json: Split cmakeGeneratorConfig field Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5387
Diffstat (limited to 'Help')
-rw-r--r--Help/manual/cmake-presets.7.rst38
-rw-r--r--Help/manual/presets/schema.json60
2 files changed, 68 insertions, 30 deletions
diff --git a/Help/manual/cmake-presets.7.rst b/Help/manual/cmake-presets.7.rst
index 68e6cb9..62c4b7c 100644
--- a/Help/manual/cmake-presets.7.rst
+++ b/Help/manual/cmake-presets.7.rst
@@ -130,34 +130,34 @@ Format
the ``architecture`` field instead.
``architecture``
+ ``toolset``
- An optional string representing the platform name to use for generators
- that support platforms.
+ Optional fields representing the platform and toolset, respectively, for
+ generators that support them. Each may be either a string or an object
+ with the following fields:
- ``toolset``
+ ``value``
- An optional string representing the toolset name to use for generators
- that support toolsets.
+ An optional string representing the value.
- ``cmakeGeneratorConfig``
+ ``strategy``
- An optional string telling CMake how to handle the ``architecture`` and
- ``toolset`` fields. Valid values are:
+ An optional string telling CMake how to handle the ``architecture`` or
+ ``toolset`` field. Valid values are:
- ``"default"``
+ ``"set"``
- Set the platform and toolset using the ``architecture`` and ``toolset``
- fields respectively. On non-Visual Studio generators, this will result
- in an error if ``architecture`` or ``toolset`` are set.
+ Set the respective value. This will result in an error for generators
+ that do not support the respective field.
- ``"ignore"``
+ ``"external"``
- Do not set the platform or toolset at all, even on Visual Studio
- generators. This is useful if, for example, a preset uses the Ninja
- generator, and an IDE knows how to set up the Visual C++ environment
- from the ``architecture`` and ``toolset`` fields. In that case, CMake
- will ignore ``architecture`` and ``toolset``, but the IDE can use them
- to set up the environment before invoking CMake.
+ Do not set the value, even if the generator supports it. This is
+ useful if, for example, a preset uses the Ninja generator, and an IDE
+ knows how to set up the Visual C++ environment from the
+ ``architecture`` and ``toolset`` fields. In that case, CMake will
+ ignore the field, but the IDE can use them to set up the environment
+ before invoking CMake.
``binaryDir``
diff --git a/Help/manual/presets/schema.json b/Help/manual/presets/schema.json
index ba4568f..57b063e 100644
--- a/Help/manual/presets/schema.json
+++ b/Help/manual/presets/schema.json
@@ -85,19 +85,57 @@
"description": "An optional string representing the generator to use for the preset. If generator is not specified, it must be inherited from the inherits preset (unless this preset is hidden). Note that for Visual Studio generators, unlike in the command line -G argument, you cannot include the platform name in the generator name. Use the architecture field instead."
},
"architecture": {
- "type": "string",
- "description": "An optional string representing the platform name to use for Visual Studio generators."
+ "anyOf": [
+ {
+ "type": "string",
+ "description": "An optional string representing the platform for generators that support it."
+ },
+ {
+ "type": "object",
+ "description": "An optional object representing the platform for generators that support it.",
+ "properties": {
+ "value": {
+ "type": "string",
+ "description": "An optional string representing the value."
+ },
+ "strategy": {
+ "type": "string",
+ "description": "An optional string telling CMake how to handle the field. Valid values are: \"set\" Set the respective value. This will result in an error for generators that do not support the respective field. \"external\" Do not set the value, even if the generator supports it. This is useful if, for example, a preset uses the Ninja generator, and an IDE knows how to set up the Visual C++ environment from the architecture and toolset fields. In that case, CMake will ignore the field, but the IDE can use them to set up the environment before invoking CMake.",
+ "enum": [
+ "set",
+ "external"
+ ]
+ }
+ },
+ "additionalProperties": false
+ }
+ ]
},
"toolset": {
- "type": "string",
- "description": "An optional string representing the toolset name to use for Visual Studio generators."
- },
- "cmakeGeneratorConfig": {
- "type": "string",
- "description": "An optional string telling CMake how to handle the architecture and toolset fields. Valid values are: \"default\": Set the platform and toolset using the architecture and toolset fields respectively. On non-Visual Studio generators, this will result in an error if architecture or toolset are set. \"ignore\": Do not set the platform or toolset at all, even on Visual Studio generators. This is useful if, for example, a preset uses the Ninja generator, and an IDE knows how to set up the Visual C++ environment from the architecture and toolset fields. In that case, CMake will ignore architecture and toolset, but the IDE can use them to set up the environment before invoking CMake.",
- "enum": [
- "default",
- "ignore"
+ "anyOf": [
+ {
+ "type": "string",
+ "description": "An optional string representing the toolset for generators that support it."
+ },
+ {
+ "type": "object",
+ "description": "An optional object representing the toolset for generators that support it.",
+ "properties": {
+ "value": {
+ "type": "string",
+ "description": "An optional string representing the value."
+ },
+ "strategy": {
+ "type": "string",
+ "description": "An optional string telling CMake how to handle the field. Valid values are: \"set\" Set the respective value. This will result in an error for generators that do not support the respective field. \"external\" Do not set the value, even if the generator supports it. This is useful if, for example, a preset uses the Ninja generator, and an IDE knows how to set up the Visual C++ environment from the architecture and toolset fields. In that case, CMake will ignore the field, but the IDE can use them to set up the environment before invoking CMake.",
+ "enum": [
+ "set",
+ "external"
+ ]
+ }
+ },
+ "additionalProperties": false
+ }
]
},
"binaryDir": {