MCPcopy Create free account
hub / github.com/Kitware/CMake / CheckLine

Function CheckLine

Source/cmLoadCacheCommand.cxx:164–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164static 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}

Callers 1

ReadWithPrefixFunction · 0.85

Calls 5

findMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45
AddDefinitionMethod · 0.45
RemoveDefinitionMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…