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

Method AddUserPath

Source/cmSearchPath.cxx:43–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void cmSearchPath::AddUserPath(std::string const& path)
44{
45 assert(this->FC);
46
47 std::vector<std::string> outPaths;
48
49 cmWindowsRegistry registry(*this->FC->Makefile,
50 cmWindowsRegistry::SimpleTypes);
51 auto expandedPaths = registry.ExpandExpression(path, this->FC->RegistryView);
52 if (expandedPaths) {
53 for (auto const& expandedPath : expandedPaths.value()) {
54 cmSystemTools::GlobDirs(expandedPath, outPaths);
55 }
56 }
57
58 // Process them all from the current directory
59 for (std::string const& p : outPaths) {
60 this->AddPathInternal(
61 cmSystemTools::CollapseFullPath(
62 p, this->FC->Makefile->GetCurrentSourceDirectory()),
63 "");
64 }
65}
66
67void cmSearchPath::AddCMakePath(std::string const& variable)
68{

Callers 4

FillPrefixesUserGuessMethod · 0.80
FillPrefixesUserHintsMethod · 0.80
FillUserHintsPathMethod · 0.80
FillUserGuessPathMethod · 0.80

Calls 3

AddPathInternalMethod · 0.95
ExpandExpressionMethod · 0.80
valueMethod · 0.80

Tested by

no test coverage detected