diff options
author | Brad King <brad.king@kitware.com> | 2013-03-04 20:40:20 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-03-04 20:40:20 (GMT) |
commit | e6b4641bfa55aff2d65bbe0c90432b17ce3ddea5 (patch) | |
tree | 2055fadfeabfb2c1eb58feae6f44c84ae90a713c /Source | |
parent | 91d86838a93cde26b4eca23faee50c6ffc1a202d (diff) | |
parent | dcb5907ed67df2e64d5e3f29fefd40e3a8c8eca3 (diff) | |
download | CMake-e6b4641bfa55aff2d65bbe0c90432b17ce3ddea5.zip CMake-e6b4641bfa55aff2d65bbe0c90432b17ce3ddea5.tar.gz CMake-e6b4641bfa55aff2d65bbe0c90432b17ce3ddea5.tar.bz2 |
Merge topic 'fix-genex-RPATH-handling'
dcb5907 Fix RPATH information when only a genex is used as a link library.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmComputeLinkInformation.cxx | 2 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 13 | ||||
-rw-r--r-- | Source/cmTarget.h | 2 |
3 files changed, 11 insertions, 6 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 84714f3..896b50a 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -1816,7 +1816,7 @@ void cmComputeLinkInformation::GetRPath(std::vector<std::string>& runtimeDirs, (outputRuntime && this->Target->HaveInstallTreeRPATH() && linking_for_install); bool use_build_rpath = - (outputRuntime && this->Target->HaveBuildTreeRPATH() && + (outputRuntime && this->Target->HaveBuildTreeRPATH(this->Config) && !linking_for_install); bool use_link_rpath = outputRuntime && linking_for_install && diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 717cfc8..f38b16e 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -4253,10 +4253,15 @@ void cmTarget::SetPropertyDefault(const char* property, } //---------------------------------------------------------------------------- -bool cmTarget::HaveBuildTreeRPATH() +bool cmTarget::HaveBuildTreeRPATH(const char *config) { - return (!this->GetPropertyAsBool("SKIP_BUILD_RPATH") && - !this->LinkLibraries.empty()); + if (this->GetPropertyAsBool("SKIP_BUILD_RPATH")) + { + return false; + } + std::vector<std::string> libs; + this->GetDirectLinkLibraries(config, libs, this); + return !libs.empty(); } //---------------------------------------------------------------------------- @@ -4327,7 +4332,7 @@ bool cmTarget::NeedRelinkBeforeInstall(const char* config) // 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->HaveBuildTreeRPATH() || this->HaveInstallTreeRPATH(); + return this->HaveBuildTreeRPATH(config) || this->HaveInstallTreeRPATH(); } //---------------------------------------------------------------------------- diff --git a/Source/cmTarget.h b/Source/cmTarget.h index e659baf..0e6dd42 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -401,7 +401,7 @@ public: */ bool NeedRelinkBeforeInstall(const char* config); - bool HaveBuildTreeRPATH(); + bool HaveBuildTreeRPATH(const char *config); bool HaveInstallTreeRPATH(); /** Return true if builtin chrpath will work for this target */ |