cmGeneratorTarget: Move HaveInstallTreeRPATH from cmTarget.

This commit is contained in:
Stephen Kelly 2015-08-05 19:02:45 +02:00
parent bf5eb4a3f3
commit c5718217ad
5 changed files with 12 additions and 12 deletions

View File

@ -1920,7 +1920,7 @@ void cmComputeLinkInformation::GetRPath(std::vector<std::string>& runtimeDirs,
(for_install || (for_install ||
this->Target->Target->GetPropertyAsBool("BUILD_WITH_INSTALL_RPATH")); this->Target->Target->GetPropertyAsBool("BUILD_WITH_INSTALL_RPATH"));
bool use_install_rpath = bool use_install_rpath =
(outputRuntime && this->Target->Target->HaveInstallTreeRPATH() && (outputRuntime && this->Target->HaveInstallTreeRPATH() &&
linking_for_install); linking_for_install);
bool use_build_rpath = bool use_build_rpath =
(outputRuntime && this->Target->HaveBuildTreeRPATH(this->Config) && (outputRuntime && this->Target->HaveBuildTreeRPATH(this->Config) &&

View File

@ -1212,7 +1212,7 @@ cmGeneratorTarget::NeedRelinkBeforeInstall(const std::string& config) const
// 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->HaveBuildTreeRPATH(config) return this->HaveBuildTreeRPATH(config)
|| this->Target->HaveInstallTreeRPATH(); || this->HaveInstallTreeRPATH();
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@ -4694,6 +4694,14 @@ bool cmGeneratorTarget::ComputePDBOutputDir(const std::string& kind,
return true; return true;
} }
//----------------------------------------------------------------------------
bool cmGeneratorTarget::HaveInstallTreeRPATH() const
{
const char* install_rpath = this->GetProperty("INSTALL_RPATH");
return (install_rpath && *install_rpath) &&
!this->Makefile->IsOn("CMAKE_SKIP_INSTALL_RPATH");
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void void
cmGeneratorTarget::ComputeLinkInterfaceLibraries( cmGeneratorTarget::ComputeLinkInterfaceLibraries(

View File

@ -407,6 +407,8 @@ public:
class TargetPropertyEntry; class TargetPropertyEntry;
bool HaveInstallTreeRPATH() const;
private: private:
friend class cmTargetTraceDependencies; friend class cmTargetTraceDependencies;
struct SourceEntry { std::vector<cmSourceFile*> Depends; }; struct SourceEntry { std::vector<cmSourceFile*> Depends; };

View File

@ -2383,14 +2383,6 @@ void cmTarget::SetPropertyDefault(const std::string& property,
} }
} }
//----------------------------------------------------------------------------
bool cmTarget::HaveInstallTreeRPATH() const
{
const char* install_rpath = this->GetProperty("INSTALL_RPATH");
return (install_rpath && *install_rpath) &&
!this->Makefile->IsOn("CMAKE_SKIP_INSTALL_RPATH");
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
const char* cmTarget::GetOutputTargetType(bool implib) const const char* cmTarget::GetOutputTargetType(bool implib) const
{ {

View File

@ -262,8 +262,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 HaveInstallTreeRPATH() const;
// Get the properties // Get the properties
cmPropertyMap &GetProperties() const { return this->Properties; } cmPropertyMap &GetProperties() const { return this->Properties; }