summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-08-05 15:37:49 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-08-26 17:46:32 (GMT)
commitabe9505df94e9a1511238c41f9d4459064148c94 (patch)
tree114059d55fbfec3a1929515bcdc591e2c55f5e30 /Source
parentd4a24c0e953e0032a2e483917850b7f8f387bbb2 (diff)
downloadCMake-abe9505df94e9a1511238c41f9d4459064148c94.zip
CMake-abe9505df94e9a1511238c41f9d4459064148c94.tar.gz
CMake-abe9505df94e9a1511238c41f9d4459064148c94.tar.bz2
cmGeneratorTarget: Move HaveBuildTreeRPath from cmTarget.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmComputeLinkInformation.cxx2
-rw-r--r--Source/cmGeneratorTarget.cxx17
-rw-r--r--Source/cmGeneratorTarget.h2
-rw-r--r--Source/cmTarget.cxx15
-rw-r--r--Source/cmTarget.h1
5 files changed, 19 insertions, 18 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 6ba0eed..192ad5f 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -1925,7 +1925,7 @@ void cmComputeLinkInformation::GetRPath(std::vector<std::string>& runtimeDirs,
(outputRuntime && this->Target->Target->HaveInstallTreeRPATH() &&
linking_for_install);
bool use_build_rpath =
- (outputRuntime && this->Target->Target->HaveBuildTreeRPATH(this->Config) &&
+ (outputRuntime && this->Target->HaveBuildTreeRPATH(this->Config) &&
!linking_for_install);
bool use_link_rpath =
outputRuntime && linking_for_install &&
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 44fac1d..9dc045c 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -909,7 +909,7 @@ cmGeneratorTarget::NeedRelinkBeforeInstall(const std::string& config) const
// If either a build or install tree rpath is set then the rpath
// will likely change between the build tree and install tree and
// this target must be relinked.
- return this->Target->HaveBuildTreeRPATH(config)
+ return this->HaveBuildTreeRPATH(config)
|| this->Target->HaveInstallTreeRPATH();
}
@@ -4414,3 +4414,18 @@ cmGeneratorTarget::GetLinkImplementation(const std::string& config) const
}
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;
+}
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 58f5f6b..99463c7 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -201,6 +201,8 @@ public:
cmLinkImplementation const*
GetLinkImplementation(const std::string& config) const;
+ bool HaveBuildTreeRPATH(const std::string& config) const;
+
/** Full path with trailing slash to the top-level directory
holding object files for this target. Includes the build
time config name placeholder if needed for the generator. */
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index a8ea0b8..9073f82 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2810,21 +2810,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
{
const char* install_rpath = this->GetProperty("INSTALL_RPATH");
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 1d353ab..8866e65 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -294,7 +294,6 @@ public:
bool GetImplibGNUtoMS(std::string const& gnuName, std::string& out,
const char* newExt = 0) const;
- bool HaveBuildTreeRPATH(const std::string& config) const;
bool HaveInstallTreeRPATH() const;
// Get the properties