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

Method ComputeImplicitLanguageTargets

Source/cmGeneratorTarget_Link.cxx:816–840  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

814}
815
816std::vector<cmLinkItem> cmGeneratorTarget::ComputeImplicitLanguageTargets(
817 std::string const& lang, std::string const& config) const
818{
819 cmListFileBacktrace bt;
820 std::vector<cmLinkItem> result;
821 cmLocalGenerator* lg = this->GetLocalGenerator();
822
823 std::string const& runtimeLibrary =
824 this->GetRuntimeLinkLibrary(lang, config);
825 if (cmValue runtimeLinkOptions = this->Makefile->GetDefinition(
826 cmStrCat("CMAKE_", lang, "_RUNTIME_LIBRARIES_", runtimeLibrary))) {
827 cmList libsList{ *runtimeLinkOptions };
828 result.reserve(libsList.size());
829
830 for (auto const& i : libsList) {
831 cmGeneratorTarget::TargetOrString resolved =
832 this->ResolveTargetReference(i, lg);
833 if (resolved.Target) {
834 result.emplace_back(resolved.Target, false, bt);
835 }
836 }
837 }
838
839 return result;
840}
841
842void cmGeneratorTarget::ComputeLinkInterfaceRuntimeLibraries(
843 std::string const& config, cmOptionalLinkInterface& iface) const

Calls 8

GetLocalGeneratorMethod · 0.95
GetRuntimeLinkLibraryMethod · 0.95
reserveMethod · 0.80
emplace_backMethod · 0.80
cmStrCatFunction · 0.70
GetDefinitionMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected