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

Method ComputeLinkInterfaceLibraries

Source/cmGeneratorTarget_Link.cxx:773–814  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

771}
772
773void cmGeneratorTarget::ComputeLinkInterfaceLibraries(
774 std::string const& config, cmOptionalLinkInterface& iface,
775 cmGeneratorTarget const* headTarget, UseTo usage) const
776{
777 // Construct the property name suffix for this configuration.
778 std::string suffix = "_";
779 if (!config.empty()) {
780 suffix += cmSystemTools::UpperCase(config);
781 } else {
782 suffix += "NOCONFIG";
783 }
784
785 // An explicit list of interface libraries may be set for shared
786 // libraries and executables that export symbols.
787 bool const haveExplicitLibraries =
788 !this->Target->GetLinkInterfaceEntries().empty() ||
789 !this->Target->GetLinkInterfaceDirectEntries().empty() ||
790 !this->Target->GetLinkInterfaceDirectExcludeEntries().empty();
791
792 // There is no implicit link interface for executables or modules
793 // so if none was explicitly set then there is no link interface.
794 if (!haveExplicitLibraries &&
795 (this->GetType() == cmStateEnums::EXECUTABLE ||
796 (this->GetType() == cmStateEnums::MODULE_LIBRARY))) {
797 return;
798 }
799 iface.Exists = true;
800
801 // The interface libraries are specified by INTERFACE_LINK_LIBRARIES.
802 // Use its special representation directly to get backtraces.
803 this->ExpandLinkItems(
804 kINTERFACE_LINK_LIBRARIES, this->Target->GetLinkInterfaceEntries(), config,
805 headTarget, usage, LinkInterfaceField::Libraries, iface);
806 this->ExpandLinkItems(kINTERFACE_LINK_LIBRARIES_DIRECT,
807 this->Target->GetLinkInterfaceDirectEntries(), config,
808 headTarget, usage, LinkInterfaceField::HeadInclude,
809 iface);
810 this->ExpandLinkItems(kINTERFACE_LINK_LIBRARIES_DIRECT_EXCLUDE,
811 this->Target->GetLinkInterfaceDirectExcludeEntries(),
812 config, headTarget, usage,
813 LinkInterfaceField::HeadExclude, iface);
814}
815
816std::vector<cmLinkItem> cmGeneratorTarget::ComputeImplicitLanguageTargets(
817 std::string const& lang, std::string const& config) const

Callers 2

GetLinkInterfaceMethod · 0.95

Calls 6

GetTypeMethod · 0.95
ExpandLinkItemsMethod · 0.95
emptyMethod · 0.45

Tested by

no test coverage detected