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

Method ParseKnownAttributes

Source/cmGlobalXCodeGenerator.cxx:494–515  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

492}
493
494bool cmGlobalXCodeGenerator::ParseKnownAttributes(
495 cm::string_view attribute, cm::string_view attributeValue)
496{
497 static std::string const knownRegions{ "knownRegions"_s };
498 if (attribute == knownRegions) {
499 std::vector<std::string> regionsVec(cmTokenize(attributeValue, ','));
500 cmXCodeObject* allLangs = this->CreateObject(cmXCodeObject::OBJECT_LIST);
501 for (auto const& region : regionsVec) {
502 allLangs->AddObject(this->CreateString(cmTrimWhitespace(region)));
503 }
504 this->RootObject->AddAttribute(knownRegions, allLangs);
505 return true;
506 }
507
508 static std::string const developmentRegion{ "developmentRegion"_s };
509 if (attribute == developmentRegion) {
510 this->RootObject->AddAttribute(
511 developmentRegion, this->CreateString(cmTrimWhitespace(attributeValue)));
512 return true;
513 }
514 return false;
515};
516
517void cmGlobalXCodeGenerator::EnableLanguage(
518 std::vector<std::string> const& lang, cmMakefile* mf, bool optional)

Callers 1

CreateXCodeObjectsMethod · 0.95

Calls 6

CreateObjectMethod · 0.95
CreateStringMethod · 0.95
cmTokenizeFunction · 0.85
cmTrimWhitespaceFunction · 0.85
AddObjectMethod · 0.80
AddAttributeMethod · 0.45

Tested by

no test coverage detected