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

Method FindAllConnections

Source/cmGraphVizWriter.cxx:311–335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309}
310
311void cmGraphVizWriter::FindAllConnections(ConnectionsMap const& connectionMap,
312 cmLinkItem const& rootItem,
313 Connections& extendedCons,
314 std::set<cmLinkItem>& visitedItems)
315{
316 // some "targets" are not in map, e.g. linker flags as -lm or
317 // targets without dependency.
318 // in both cases we are finished with traversing the graph
319 if (connectionMap.find(rootItem) == connectionMap.cend()) {
320 return;
321 }
322
323 Connections const& origCons = connectionMap.at(rootItem);
324
325 for (Connection const& con : origCons) {
326 extendedCons.emplace_back(con);
327 cmLinkItem const& dstItem = con.dst;
328 bool const visited = visitedItems.find(dstItem) != visitedItems.cend();
329 if (!visited) {
330 visitedItems.insert(dstItem);
331 this->FindAllConnections(connectionMap, dstItem, extendedCons,
332 visitedItems);
333 }
334 }
335}
336
337void cmGraphVizWriter::FindAllConnections(ConnectionsMap const& connectionMap,
338 cmLinkItem const& rootItem,

Callers 1

Calls 5

cendMethod · 0.80
emplace_backMethod · 0.80
findMethod · 0.45
atMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected