Feature request: also add "multiConfig" boolean flag to cmake -E capabilities
It would be great if the generator's information from cmake -E
command will also include the boolean flag describing the "multi-configness" of the reported generator, e.g.:
Updated `cmake -E capabilities` JSON answer (updates marked by '*')
{
"fileApi": {
"requests": [
{
"kind": "codemodel",
"version": [
{
"major": 2,
"minor": *5*
}
]
},
{
"kind": "cache",
"version": [
{
"major": 2,
"minor": 0
}
]
},
{
"kind": "cmakeFiles",
"version": [
{
"major": 1,
"minor": 0
}
]
},
{
"kind": "toolchains",
"version": [
{
"major": 1,
"minor": 0
}
]
}
]
},
"generators": [
{
"extraGenerators": [],
"name": "Watcom WMake",
*"multiConfig" : false*,
"platformSupport": false,
"toolsetSupport": false
},
{
"extraGenerators": [],
"name": "Ninja Multi-Config",
*"multiConfig" : true*,
"platformSupport": false,
"toolsetSupport": false
},
{
"extraGenerators": [
"CodeBlocks",
"CodeLite",
"Eclipse CDT4",
"Kate",
"Sublime Text 2"
],
"name": "Ninja",
*"multiConfig" : false*,
"platformSupport": false,
"toolsetSupport": false
},
{
"extraGenerators": [
"CodeBlocks",
"CodeLite",
"Eclipse CDT4",
"Kate",
"Sublime Text 2"
],
"name": "Unix Makefiles",
*"multiConfig" : false*,
"platformSupport": false,
"toolsetSupport": false
},
{
"extraGenerators": [],
"name": "Green Hills MULTI",
*"multiConfig" : true*,
"platformSupport": true,
"toolsetSupport": true
}
],
"serverMode": false,
"version": {
"isDirty": false,
"major": 3,
"minor": 23,
"patch": 1,
"string": "3.23.1",
"suffix": ""
}
}
This additional information may help e.g. in CI pipelines, where could be cross-platform builds from distinct generators (e.g. ninja and xcode) and if the current generator is multi-config, then the CI would build as cmake --build <dir> --config Debug
and must not use CMAKE_BUILD_TYPE
as it would be ignored, and otherwise the CI would build as regular cmake --build <dir>
and may use CMAKE_BUILD_TYPE
.
Thanks for your attention.