| 703 | } |
| 704 | |
| 705 | void 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 | |
| 726 | void cmPackageInfoReader::SetTargetProperties( |
| 727 | cmMakefile* makefile, cmTarget* target, Json::Value const& data, |
no test coverage detected