| 309 | } |
| 310 | |
| 311 | void 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 | |
| 337 | void cmGraphVizWriter::FindAllConnections(ConnectionsMap const& connectionMap, |
| 338 | cmLinkItem const& rootItem, |
no test coverage detected