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

Method ComputeFinalPaths

Source/cmFindCommon.cxx:457–486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

455}
456
457void 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
488cmFindCommonDebugState::cmFindCommonDebugState(std::string name,
489 cmFindCommon const* findCommand)

Callers 2

ComputePrefixesMethod · 0.80
ParseArgumentsMethod · 0.80

Calls 9

GetIgnoredPathsMethod · 0.95
GetIgnoredPrefixPathsMethod · 0.95
RerootPathsMethod · 0.95
ExtractWithoutMethod · 0.80
clearMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected