| 41 | } |
| 42 | |
| 43 | void 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 | |
| 67 | void cmSearchPath::AddCMakePath(std::string const& variable) |
| 68 | { |
no test coverage detected