cmGeneratorTarget: Move ComputeLinkImplementationLanguages from cmTarget.
This commit is contained in:
parent
abe9505df9
commit
0431f2c4d7
|
@ -4410,11 +4410,25 @@ cmGeneratorTarget::GetLinkImplementation(const std::string& config) const
|
|||
if(!impl.LanguagesDone)
|
||||
{
|
||||
impl.LanguagesDone = true;
|
||||
this->Target->ComputeLinkImplementationLanguages(config, impl);
|
||||
this->ComputeLinkImplementationLanguages(config, impl);
|
||||
}
|
||||
return &impl;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGeneratorTarget::ComputeLinkImplementationLanguages(
|
||||
const std::string& config,
|
||||
cmOptionalLinkImplementation& impl) const
|
||||
{
|
||||
// This target needs runtime libraries for its source languages.
|
||||
std::set<std::string> languages;
|
||||
// Get languages used in our source files.
|
||||
this->Target->GetLanguages(languages, config);
|
||||
// Copy the set of langauges to the link implementation.
|
||||
impl.Languages.insert(impl.Languages.begin(),
|
||||
languages.begin(), languages.end());
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmGeneratorTarget::HaveBuildTreeRPATH(const std::string& config) const
|
||||
{
|
||||
|
|
|
@ -201,6 +201,10 @@ public:
|
|||
cmLinkImplementation const*
|
||||
GetLinkImplementation(const std::string& config) const;
|
||||
|
||||
void ComputeLinkImplementationLanguages(const std::string& config,
|
||||
cmOptionalLinkImplementation& impl
|
||||
) const;
|
||||
|
||||
bool HaveBuildTreeRPATH(const std::string& config) const;
|
||||
|
||||
/** Full path with trailing slash to the top-level directory
|
||||
|
|
|
@ -3704,20 +3704,6 @@ void cmTarget::ComputeLinkImplementationLibraries(
|
|||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::ComputeLinkImplementationLanguages(
|
||||
const std::string& config,
|
||||
cmOptionalLinkImplementation& impl) const
|
||||
{
|
||||
// This target needs runtime libraries for its source languages.
|
||||
std::set<std::string> languages;
|
||||
// Get languages used in our source files.
|
||||
this->GetLanguages(languages, config);
|
||||
// Copy the set of langauges to the link implementation.
|
||||
impl.Languages.insert(impl.Languages.begin(),
|
||||
languages.begin(), languages.end());
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
cmTarget const* cmTarget::FindTargetToLink(std::string const& name) const
|
||||
{
|
||||
|
|
|
@ -237,9 +237,6 @@ public:
|
|||
void ComputeLinkImplementationLibraries(const std::string& config,
|
||||
cmOptionalLinkImplementation& impl,
|
||||
cmTarget const* head) const;
|
||||
void ComputeLinkImplementationLanguages(const std::string& config,
|
||||
cmOptionalLinkImplementation& impl
|
||||
) const;
|
||||
|
||||
cmOptionalLinkImplementation&
|
||||
GetLinkImplMap(std::string const& config) const;
|
||||
|
|
Loading…
Reference in New Issue