mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-21 23:00:50 +08:00
cmake: add supported platforms to cmake -E capabilties report
This commit is contained in:
@@ -575,6 +575,12 @@ Available commands are:
|
|||||||
``true`` if the generator supports toolsets and ``false`` otherwise.
|
``true`` if the generator supports toolsets and ``false`` otherwise.
|
||||||
``platformSupport``
|
``platformSupport``
|
||||||
``true`` if the generator supports platforms and ``false`` otherwise.
|
``true`` if the generator supports platforms and ``false`` otherwise.
|
||||||
|
``supportedPlatforms``
|
||||||
|
.. versionadded:: 3.21
|
||||||
|
|
||||||
|
Optional member that may be present when the generator supports
|
||||||
|
platform specification via :variable:`CMAKE_GENERATOR_PLATFORM`
|
||||||
|
(``-A ...``). The value is a list of platforms known to be supported.
|
||||||
``extraGenerators``
|
``extraGenerators``
|
||||||
A list of strings with all the extra generators compatible with
|
A list of strings with all the extra generators compatible with
|
||||||
the generator.
|
the generator.
|
||||||
|
6
Help/release/dev/capabilties-generator-platforms.rst
Normal file
6
Help/release/dev/capabilties-generator-platforms.rst
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
capabilties-generator-platforms
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
* The :manual:`cmake(1)` ``-E capabilities`` output now contains for each
|
||||||
|
generator a ``supportedPlatforms`` field listing platform known to
|
||||||
|
be supported in :variable:`CMAKE_GENERATOR_PLATFORM`.
|
@@ -259,6 +259,13 @@ Json::Value cmake::ReportCapabilitiesJson() const
|
|||||||
gen["name"] = gi.name;
|
gen["name"] = gi.name;
|
||||||
gen["toolsetSupport"] = gi.supportsToolset;
|
gen["toolsetSupport"] = gi.supportsToolset;
|
||||||
gen["platformSupport"] = gi.supportsPlatform;
|
gen["platformSupport"] = gi.supportsPlatform;
|
||||||
|
if (!gi.supportedPlatforms.empty()) {
|
||||||
|
Json::Value supportedPlatforms = Json::arrayValue;
|
||||||
|
for (std::string const& platform : gi.supportedPlatforms) {
|
||||||
|
supportedPlatforms.append(platform);
|
||||||
|
}
|
||||||
|
gen["supportedPlatforms"] = std::move(supportedPlatforms);
|
||||||
|
}
|
||||||
gen["extraGenerators"] = Json::arrayValue;
|
gen["extraGenerators"] = Json::arrayValue;
|
||||||
generatorMap[gi.name] = gen;
|
generatorMap[gi.name] = gen;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user