| 160 | } |
| 161 | |
| 162 | void cmGlobVerificationManager::AddCacheEntry( |
| 163 | cmGlobCacheEntry const& entry, std::string const& variable, |
| 164 | cmListFileBacktrace const& backtrace, cmMessenger* messenger) |
| 165 | { |
| 166 | CacheEntryKey key = |
| 167 | CacheEntryKey(entry.Recurse, entry.ListDirectories, entry.FollowSymlinks, |
| 168 | entry.Relative, entry.Expression); |
| 169 | CacheEntryValue& value = this->Cache[key]; |
| 170 | if (!value.Initialized) { |
| 171 | value.Files = entry.Files; |
| 172 | value.Initialized = true; |
| 173 | value.Backtraces.emplace_back(variable, backtrace); |
| 174 | } else if (value.Initialized && value.Files != entry.Files) { |
| 175 | std::ostringstream message; |
| 176 | message << std::boolalpha; |
| 177 | message << "The glob expression\n "; |
| 178 | key.PrintGlobCommand(message, variable); |
| 179 | message << "\nwas already present in the glob cache but the directory " |
| 180 | "contents have changed during the configuration run.\n"; |
| 181 | message << "Matching glob expressions:"; |
| 182 | for (auto const& bt : value.Backtraces) { |
| 183 | message << "\n " << std::get<0>(bt); |
| 184 | messenger->PrintBacktraceTitle(message, std::get<1>(bt)); |
| 185 | } |
| 186 | messenger->IssueMessage(MessageType::FATAL_ERROR, message.str(), |
| 187 | backtrace); |
| 188 | } else { |
| 189 | value.Backtraces.emplace_back(variable, backtrace); |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | std::vector<cmGlobCacheEntry> cmGlobVerificationManager::GetCacheEntries() |
| 194 | const |
nothing calls this directly
no test coverage detected