| 162 | } |
| 163 | |
| 164 | static void CheckLine(cmMakefile& mf, std::string const& prefix, |
| 165 | std::set<std::string> const& variablesToRead, |
| 166 | char const* line) |
| 167 | { |
| 168 | // Check one line of the cache file. |
| 169 | std::string var; |
| 170 | std::string value; |
| 171 | cmStateEnums::CacheEntryType type = cmStateEnums::UNINITIALIZED; |
| 172 | if (cmake::ParseCacheEntry(line, var, value, type)) { |
| 173 | // Found a real entry. See if this one was requested. |
| 174 | if (variablesToRead.find(var) != variablesToRead.end()) { |
| 175 | // This was requested. Set this variable locally with the given |
| 176 | // prefix. |
| 177 | var = prefix + var; |
| 178 | if (!value.empty()) { |
| 179 | mf.AddDefinition(var, value); |
| 180 | } else { |
| 181 | mf.RemoveDefinition(var); |
| 182 | } |
| 183 | } |
| 184 | } |
| 185 | } |
no test coverage detected
searching dependent graphs…