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

Method DumpTargets

Source/cmInstrumentation.cxx:248–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248Json::Value cmInstrumentation::DumpTargets(
249 std::unique_ptr<cmGlobalGenerator> const& gg)
250{
251 Json::Value targets = Json::objectValue;
252 std::vector<cmGeneratorTarget*> targetList;
253 for (auto const& lg : gg->GetLocalGenerators()) {
254 cm::append(targetList, lg->GetGeneratorTargets());
255 }
256 for (cmGeneratorTarget* gt : targetList) {
257 if (this->IsInstrumentableTargetType(gt->GetType())) {
258 Json::Value target = Json::objectValue;
259 auto labels = gt->GetSafeProperty("LABELS");
260 target["labels"] = Json::arrayValue;
261 for (auto const& item : cmList(labels)) {
262 target["labels"].append(item);
263 }
264 target["type"] = cmState::GetTargetTypeName(gt->GetType()).c_str();
265 targets[gt->GetName()] = target;
266 }
267 }
268 return targets;
269}
270
271std::string cmInstrumentation::GetFileByTimestamp(
272 cmInstrumentation::LatestOrOldest order, std::string const& dataSubdir,

Callers 1

WriteCMakeContentMethod · 0.95

Calls 7

appendFunction · 0.85
cmListClass · 0.85
appendMethod · 0.80
c_strMethod · 0.80
GetTypeMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected