| 2890 | } |
| 2891 | |
| 2892 | bool cmFindPackageCommand::CheckDirectory(std::string const& dir, |
| 2893 | PackageDescriptionType type) |
| 2894 | { |
| 2895 | assert(!dir.empty() && dir.back() == '/'); |
| 2896 | |
| 2897 | std::string const d = dir.substr(0, dir.size() - 1); |
| 2898 | if (cm::contains(this->IgnoredPaths, d)) { |
| 2899 | this->ConsideredPaths.emplace_back( |
| 2900 | dir, cmFindPackageCommand::FoundMode(type), SearchResult::Ignored); |
| 2901 | return false; |
| 2902 | } |
| 2903 | |
| 2904 | // Look for the file in this directory. |
| 2905 | std::string file; |
| 2906 | FoundPackageMode foundMode = FoundPackageMode::None; |
| 2907 | if (this->FindConfigFile(d, type, file, foundMode)) { |
| 2908 | this->FileFound = std::move(file); |
| 2909 | this->FileFoundMode = foundMode; |
| 2910 | return true; |
| 2911 | } |
| 2912 | return false; |
| 2913 | } |
| 2914 | |
| 2915 | bool cmFindPackageCommand::FindConfigFile(std::string const& dir, |
| 2916 | PackageDescriptionType type, |
no test coverage detected