| 2040 | } |
| 2041 | |
| 2042 | cmFindPackageCommand::AppendixMap cmFindPackageCommand::FindAppendices( |
| 2043 | std::string const& base, cmPackageInfoReader const& baseReader) const |
| 2044 | { |
| 2045 | AppendixMap appendices; |
| 2046 | |
| 2047 | // Find package appendices. |
| 2048 | cmsys::Glob glob; |
| 2049 | glob.RecurseOff(); |
| 2050 | if (glob.FindFiles(cmStrCat(cmSystemTools::GetFilenamePath(base), "/"_s, |
| 2051 | cmSystemTools::GetFilenameWithoutExtension(base), |
| 2052 | "[-:]*.[Cc][Pp][Ss]"_s))) { |
| 2053 | // Check glob results for valid appendices. |
| 2054 | for (std::string const& extra : glob.GetFiles()) { |
| 2055 | // Exclude configuration-specific files for now; we look at them later |
| 2056 | // when we load their respective configuration-agnostic appendices. |
| 2057 | if (extra.find('@') != std::string::npos) { |
| 2058 | continue; |
| 2059 | } |
| 2060 | |
| 2061 | cmMakefile::CallRAII cs{ this->Makefile, extra, this->Status }; |
| 2062 | |
| 2063 | std::unique_ptr<cmPackageInfoReader> reader = |
| 2064 | cmPackageInfoReader::Read(this->Makefile, extra, &baseReader); |
| 2065 | |
| 2066 | if (reader && reader->GetName() == this->Name) { |
| 2067 | std::vector<std::string> components = reader->GetComponentNames(); |
| 2068 | Appendix appendix{ std::move(reader), std::move(components) }; |
| 2069 | appendices.emplace(extra, std::move(appendix)); |
| 2070 | } |
| 2071 | } |
| 2072 | } |
| 2073 | |
| 2074 | return appendices; |
| 2075 | } |
| 2076 | |
| 2077 | bool cmFindPackageCommand::ReadListFile(std::string const& f, |
| 2078 | PolicyScopeRule const psr) |
no test coverage detected