| 269 | } // namespace |
| 270 | |
| 271 | cmCxxModuleMetadata::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 | |
| 294 | namespace { |
| 295 |
nothing calls this directly
no test coverage detected