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

Method ItemNameWithAliases

Source/cmGraphVizWriter.cxx:552–573  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

550}
551
552std::string cmGraphVizWriter::ItemNameWithAliases(
553 std::string const& itemName) const
554{
555 std::vector<std::string> items;
556 for (auto const& lg : this->GlobalGenerator->GetLocalGenerators()) {
557 for (auto const& aliasTargets : lg->GetMakefile()->GetAliasTargets()) {
558 if (aliasTargets.second == itemName) {
559 items.push_back(aliasTargets.first);
560 }
561 }
562 }
563
564 std::sort(items.begin(), items.end());
565 items.erase(std::unique(items.begin(), items.end()), items.end());
566
567 auto nameWithAliases = itemName;
568 for(auto const& item : items) {
569 nameWithAliases += "\\n(" + item + ")";
570 }
571
572 return nameWithAliases;
573}
574
575std::string cmGraphVizWriter::GetEdgeStyle(DependencyType dt)
576{

Callers 1

WriteNodeMethod · 0.95

Calls 6

GetAliasTargetsMethod · 0.80
push_backMethod · 0.80
eraseMethod · 0.80
GetMakefileMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected