summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-05-11 13:22:30 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-05-11 13:22:47 (GMT)
commitd0b6eb8ec7ac3eac10889ef50bb0c76cd308bde8 (patch)
tree047df76b209a54fd0ff28d1ae51d467241359b80 /Source/cmake.cxx
parentad961fd42a595e877400aaecd3a47a973e9c6e89 (diff)
parent66be34853ce0046c132a5713d41e5c3608612bbf (diff)
downloadCMake-d0b6eb8ec7ac3eac10889ef50bb0c76cd308bde8.zip
CMake-d0b6eb8ec7ac3eac10889ef50bb0c76cd308bde8.tar.gz
CMake-d0b6eb8ec7ac3eac10889ef50bb0c76cd308bde8.tar.bz2
Merge topic 'capabilties-generator-platforms'
66be34853c cmake: add supported platforms to cmake -E capabilties report Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6102
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index a08babe..278fcc1 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -259,6 +259,13 @@ Json::Value cmake::ReportCapabilitiesJson() const
gen["name"] = gi.name;
gen["toolsetSupport"] = gi.supportsToolset;
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;
generatorMap[gi.name] = gen;
} else {