summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-03-01 18:02:08 (GMT)
committerBrad King <brad.king@kitware.com>2008-03-01 18:02:08 (GMT)
commit59001281bb917c436c3ec03301769a863d60985a (patch)
treef63959e07ba61eb2eac1d8f29182e927f0ff684d /Source/cmTarget.cxx
parent34c76d4304064d7d0e28ceaeee8ba4048497215a (diff)
downloadCMake-59001281bb917c436c3ec03301769a863d60985a.zip
CMake-59001281bb917c436c3ec03301769a863d60985a.tar.gz
CMake-59001281bb917c436c3ec03301769a863d60985a.tar.bz2
BUG: Do not try to change the RPATH when installing a target if CMAKE_SKIP_RPATH is on or the path does not need to be changed.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 880c370..c14e527 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -3007,6 +3007,18 @@ void cmTarget::GetLanguages(std::set<cmStdString>& languages) const
bool cmTarget::IsChrpathUsed()
{
#if defined(CMAKE_USE_ELF_PARSER)
+ // Skip chrpath if skipping rpath altogether.
+ if(this->Makefile->IsOn("CMAKE_SKIP_RPATH"))
+ {
+ return false;
+ }
+
+ // Skip chrpath if it does not need to be changed at install time.
+ if(this->GetPropertyAsBool("BUILD_WITH_INSTALL_RPATH"))
+ {
+ return false;
+ }
+
// Enable if the rpath flag uses a separator and the target uses ELF
// binaries.
if(const char* ll = this->GetLinkerLanguage(