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

Method GetLinkerTypeProperty

Source/cmGeneratorTarget.cxx:741–766  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

739}
740
741std::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
768char const* cmGeneratorTarget::GetLinkPIEProperty(
769 std::string const& config) const

Callers 4

GetLinkerToolMethod · 0.95
AppendLinkerTypeFlagsMethod · 0.80
GenerateTargetMethod · 0.80
OutputBuildToolMethod · 0.80

Calls 5

GetPropertyMethod · 0.95
IsDeviceLinkMethod · 0.95
erase_ifFunction · 0.85
to_stringMethod · 0.80
IsEmptyMethod · 0.45

Tested by

no test coverage detected