| 455 | } |
| 456 | |
| 457 | void cmFindCommon::ComputeFinalPaths(IgnorePaths ignorePaths, |
| 458 | std::string* debugBuffer) |
| 459 | { |
| 460 | // Filter out ignored paths from the prefix list |
| 461 | std::set<std::string> ignoredPaths; |
| 462 | std::set<std::string> ignoredPrefixes; |
| 463 | if (ignorePaths == IgnorePaths::Yes) { |
| 464 | this->GetIgnoredPaths(ignoredPaths); |
| 465 | this->GetIgnoredPrefixPaths(ignoredPrefixes); |
| 466 | } |
| 467 | |
| 468 | // Combine the separate path types, filtering out ignores |
| 469 | this->SearchPaths.clear(); |
| 470 | std::vector<PathLabel>& allLabels = this->PathGroupLabelMap[PathGroup::All]; |
| 471 | for (PathLabel const& l : allLabels) { |
| 472 | this->LabeledPaths[l].ExtractWithout(ignoredPaths, ignoredPrefixes, |
| 473 | this->SearchPaths); |
| 474 | } |
| 475 | |
| 476 | // Expand list of paths inside all search roots. |
| 477 | this->RerootPaths(this->SearchPaths, debugBuffer); |
| 478 | |
| 479 | // Add a trailing slash to all paths to aid the search process. |
| 480 | std::for_each(this->SearchPaths.begin(), this->SearchPaths.end(), |
| 481 | [](std::string& s) { |
| 482 | if (!s.empty() && s.back() != '/') { |
| 483 | s += '/'; |
| 484 | } |
| 485 | }); |
| 486 | } |
| 487 | |
| 488 | cmFindCommonDebugState::cmFindCommonDebugState(std::string name, |
| 489 | cmFindCommon const* findCommand) |
no test coverage detected