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

Method SetMetaProperty

Source/cmPackageInfoReader.cxx:705–724  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

703}
704
705void cmPackageInfoReader::SetMetaProperty(
706 cmMakefile* makefile, cmTarget* target, std::string const& property,
707 Json::Value const& object, std::string const& attribute,
708 std::string const& defaultValue) const
709{
710 Json::Value const& value = object[attribute];
711 if (!value.isNull()) {
712 if (value.isString()) {
713 target->SetProperty(property, value.asString());
714 } else {
715 makefile->IssueMessage(MessageType::WARNING,
716 cmStrCat("Failed to set property \""_s, property,
717 "\" on target \""_s, target->GetName(),
718 "\": attribute \"", attribute,
719 "\" is not a string."_s));
720 }
721 } else if (!defaultValue.empty()) {
722 target->SetProperty(property, defaultValue);
723 }
724}
725
726void cmPackageInfoReader::SetTargetProperties(
727 cmMakefile* makefile, cmTarget* target, Json::Value const& data,

Callers 1

SetTargetPropertiesMethod · 0.95

Calls 8

isNullMethod · 0.80
isStringMethod · 0.80
asStringMethod · 0.80
cmStrCatFunction · 0.70
SetPropertyMethod · 0.45
IssueMessageMethod · 0.45
GetNameMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected