| 169 | "STRINGS" }; |
| 170 | |
| 171 | bool cmCacheManager::ReadPropertyEntry(std::string const& entryKey, |
| 172 | CacheEntry const& e) |
| 173 | { |
| 174 | // All property entries are internal. |
| 175 | if (e.Type != cmStateEnums::INTERNAL) { |
| 176 | return false; |
| 177 | } |
| 178 | |
| 179 | char const* end = entryKey.c_str() + entryKey.size(); |
| 180 | for (char const* p : cmCacheManager::PersistentProperties) { |
| 181 | std::string::size_type plen = strlen(p) + 1; |
| 182 | if (entryKey.size() > plen && *(end - plen) == '-' && |
| 183 | strcmp(end - plen + 1, p) == 0) { |
| 184 | std::string key = entryKey.substr(0, entryKey.size() - plen); |
| 185 | if (auto* entry = this->GetCacheEntry(key)) { |
| 186 | // Store this property on its entry. |
| 187 | entry->SetProperty(p, e.Value); |
| 188 | } else { |
| 189 | // Create an entry and store the property. |
| 190 | CacheEntry& ne = this->Cache[key]; |
| 191 | ne.SetProperty(p, e.Value); |
| 192 | } |
| 193 | return true; |
| 194 | } |
| 195 | } |
| 196 | return false; |
| 197 | } |
| 198 | |
| 199 | void cmCacheManager::WritePropertyEntries(std::ostream& os, |
| 200 | std::string const& entryKey, |
no test coverage detected