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

Method LoadFromFile

Source/cmCxxModuleMetadata.cxx:271–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269} // namespace
270
271cmCxxModuleMetadata::ParseResult cmCxxModuleMetadata::LoadFromFile(
272 std::string const& path)
273{
274 ParseResult res;
275
276 Json::Value root;
277 cmJSONState parseState(path, &root);
278 if (!parseState.errors.empty()) {
279 res.Error = parseState.GetErrorMessage();
280 return res;
281 }
282
283 cmCxxModuleMetadata meta;
284 if (!ParseRoot(root, meta, &parseState)) {
285 res.Error = parseState.GetErrorMessage();
286 return res;
287 }
288
289 meta.MetadataFilePath = path;
290 res.Meta = std::move(meta);
291 return res;
292}
293
294namespace {
295

Callers

nothing calls this directly

Calls 4

ParseRootFunction · 0.85
moveFunction · 0.85
emptyMethod · 0.45
GetErrorMessageMethod · 0.45

Tested by

no test coverage detected