MCPcopy Create free account
hub / github.com/Kitware/CMake / DumpResourceGroupsToJsonArray

Function DumpResourceGroupsToJsonArray

Source/CTest/cmCTestMultiProcessHandler.cxx:1111–1131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1109}
1110
1111static Json::Value DumpResourceGroupsToJsonArray(
1112 std::vector<
1113 std::vector<cmCTestTestHandler::cmCTestTestResourceRequirement>> const&
1114 resourceGroups)
1115{
1116 Json::Value jsonResourceGroups = Json::arrayValue;
1117 for (auto const& it : resourceGroups) {
1118 Json::Value jsonResourceGroup = Json::objectValue;
1119 Json::Value requirements = Json::arrayValue;
1120 for (auto const& it2 : it) {
1121 Json::Value res = Json::objectValue;
1122 res[".type"] = it2.ResourceType;
1123 // res[".units"] = it2.UnitsNeeded; // Intentionally commented out
1124 res["slots"] = it2.SlotsNeeded;
1125 requirements.append(res);
1126 }
1127 jsonResourceGroup["requirements"] = requirements;
1128 jsonResourceGroups.append(jsonResourceGroup);
1129 }
1130 return jsonResourceGroups;
1131}
1132
1133static Json::Value DumpCTestProperty(std::string const& name,
1134 Json::Value value)

Callers 1

DumpCTestPropertiesFunction · 0.85

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…