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

Method GetArrayConfig

Source/cmQtAutoGenerator.cxx:366–385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364}
365
366bool cmQtAutoGenerator::InfoT::GetArrayConfig(std::string const& key,
367 std::vector<std::string>& list,
368 bool required) const
369{
370 { // Try config
371 std::string const configKey = this->ConfigKey(key);
372 Json::Value const& jval = this->Json_[configKey];
373 if (!jval.isNull()) {
374 if (!jval.isArray()) {
375 return this->LogError(cmStrCat(configKey, " is not an array string."));
376 }
377 if (!GetJsonArray(list, jval) && required) {
378 return this->LogError(cmStrCat(configKey, " is empty."));
379 }
380 return true;
381 }
382 }
383 // Try plain
384 return this->GetArray(key, list, required);
385}
386
387bool cmQtAutoGenerator::InfoT::LogError(GenT genType,
388 cm::string_view message) const

Callers 2

InitFromInfoMethod · 0.80
InitFromInfoMethod · 0.80

Calls 6

ConfigKeyMethod · 0.95
LogErrorMethod · 0.95
GetArrayMethod · 0.95
isNullMethod · 0.80
isArrayMethod · 0.80
cmStrCatFunction · 0.70

Tested by

no test coverage detected