| 739 | } |
| 740 | |
| 741 | std::string cmGeneratorTarget::GetLinkerTypeProperty( |
| 742 | std::string const& lang, std::string const& config) const |
| 743 | { |
| 744 | std::string propName{ "LINKER_TYPE" }; |
| 745 | auto linkerType = this->GetProperty(propName); |
| 746 | if (!linkerType.IsEmpty()) { |
| 747 | cm::GenEx::Context context(this->LocalGenerator, config, lang); |
| 748 | cmGeneratorExpressionDAGChecker dagChecker{ |
| 749 | this, propName, nullptr, nullptr, context, |
| 750 | }; |
| 751 | auto ltype = cmGeneratorExpression::Evaluate( |
| 752 | *linkerType, context.LG, context.Config, this, &dagChecker, this, |
| 753 | context.Language); |
| 754 | if (this->IsDeviceLink()) { |
| 755 | cmList list{ ltype }; |
| 756 | auto const DL_BEGIN = "<DEVICE_LINK>"_s; |
| 757 | auto const DL_END = "</DEVICE_LINK>"_s; |
| 758 | cm::erase_if(list, [&](std::string const& item) { |
| 759 | return item == DL_BEGIN || item == DL_END; |
| 760 | }); |
| 761 | return list.to_string(); |
| 762 | } |
| 763 | return ltype; |
| 764 | } |
| 765 | return std::string{}; |
| 766 | } |
| 767 | |
| 768 | char const* cmGeneratorTarget::GetLinkPIEProperty( |
| 769 | std::string const& config) const |
no test coverage detected