diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-16 20:19:11 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-22 15:24:39 (GMT) |
commit | 64afabdbcb265acb53a9b8f8cb86465d31f2ca61 (patch) | |
tree | ca2616a38a2bf7c80d8635d7fd0f2957645a0a45 /Help/manual/presets | |
parent | 609122007dc074739b394d2f70f674bbccca6073 (diff) | |
download | CMake-64afabdbcb265acb53a9b8f8cb86465d31f2ca61.zip CMake-64afabdbcb265acb53a9b8f8cb86465d31f2ca61.tar.gz CMake-64afabdbcb265acb53a9b8f8cb86465d31f2ca61.tar.bz2 |
CMakePresets.json: Split cmakeGeneratorConfig field
Make this field separate for both architecture and toolset. Allow
architecture and toolset to be either strings or objects with value
and strategy fields.
Fixes: #21317
Diffstat (limited to 'Help/manual/presets')
-rw-r--r-- | Help/manual/presets/schema.json | 60 |
1 files changed, 49 insertions, 11 deletions
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": { |