cmGeneratorTarget: Move HaveBuildTreeRPath from cmTarget.
This commit is contained in:
parent
d4a24c0e95
commit
abe9505df9
|
@ -1925,7 +1925,7 @@ void cmComputeLinkInformation::GetRPath(std::vector<std::string>& runtimeDirs,
|
||||||
(outputRuntime && this->Target->Target->HaveInstallTreeRPATH() &&
|
(outputRuntime && this->Target->Target->HaveInstallTreeRPATH() &&
|
||||||
linking_for_install);
|
linking_for_install);
|
||||||
bool use_build_rpath =
|
bool use_build_rpath =
|
||||||
(outputRuntime && this->Target->Target->HaveBuildTreeRPATH(this->Config) &&
|
(outputRuntime && this->Target->HaveBuildTreeRPATH(this->Config) &&
|
||||||
!linking_for_install);
|
!linking_for_install);
|
||||||
bool use_link_rpath =
|
bool use_link_rpath =
|
||||||
outputRuntime && linking_for_install &&
|
outputRuntime && linking_for_install &&
|
||||||
|
|
|
@ -909,7 +909,7 @@ cmGeneratorTarget::NeedRelinkBeforeInstall(const std::string& config) const
|
||||||
// If either a build or install tree rpath is set then the rpath
|
// If either a build or install tree rpath is set then the rpath
|
||||||
// will likely change between the build tree and install tree and
|
// will likely change between the build tree and install tree and
|
||||||
// this target must be relinked.
|
// this target must be relinked.
|
||||||
return this->Target->HaveBuildTreeRPATH(config)
|
return this->HaveBuildTreeRPATH(config)
|
||||||
|| this->Target->HaveInstallTreeRPATH();
|
|| this->Target->HaveInstallTreeRPATH();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4414,3 +4414,18 @@ cmGeneratorTarget::GetLinkImplementation(const std::string& config) const
|
||||||
}
|
}
|
||||||
return &impl;
|
return &impl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
bool cmGeneratorTarget::HaveBuildTreeRPATH(const std::string& config) const
|
||||||
|
{
|
||||||
|
if (this->Target->GetPropertyAsBool("SKIP_BUILD_RPATH"))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(cmLinkImplementationLibraries const* impl =
|
||||||
|
this->Target->GetLinkImplementationLibraries(config))
|
||||||
|
{
|
||||||
|
return !impl->Libraries.empty();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
|
@ -201,6 +201,8 @@ public:
|
||||||
cmLinkImplementation const*
|
cmLinkImplementation const*
|
||||||
GetLinkImplementation(const std::string& config) const;
|
GetLinkImplementation(const std::string& config) const;
|
||||||
|
|
||||||
|
bool HaveBuildTreeRPATH(const std::string& config) const;
|
||||||
|
|
||||||
/** Full path with trailing slash to the top-level directory
|
/** Full path with trailing slash to the top-level directory
|
||||||
holding object files for this target. Includes the build
|
holding object files for this target. Includes the build
|
||||||
time config name placeholder if needed for the generator. */
|
time config name placeholder if needed for the generator. */
|
||||||
|
|
|
@ -2809,21 +2809,6 @@ void cmTarget::SetPropertyDefault(const std::string& property,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
|
||||||
bool cmTarget::HaveBuildTreeRPATH(const std::string& config) const
|
|
||||||
{
|
|
||||||
if (this->GetPropertyAsBool("SKIP_BUILD_RPATH"))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if(cmLinkImplementationLibraries const* impl =
|
|
||||||
this->GetLinkImplementationLibraries(config))
|
|
||||||
{
|
|
||||||
return !impl->Libraries.empty();
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
bool cmTarget::HaveInstallTreeRPATH() const
|
bool cmTarget::HaveInstallTreeRPATH() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -294,7 +294,6 @@ public:
|
||||||
bool GetImplibGNUtoMS(std::string const& gnuName, std::string& out,
|
bool GetImplibGNUtoMS(std::string const& gnuName, std::string& out,
|
||||||
const char* newExt = 0) const;
|
const char* newExt = 0) const;
|
||||||
|
|
||||||
bool HaveBuildTreeRPATH(const std::string& config) const;
|
|
||||||
bool HaveInstallTreeRPATH() const;
|
bool HaveInstallTreeRPATH() const;
|
||||||
|
|
||||||
// Get the properties
|
// Get the properties
|
||||||
|
|
Loading…
Reference in New Issue