summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-09-09 12:57:20 (GMT)
committerBrad King <brad.king@kitware.com>2014-09-09 13:01:59 (GMT)
commitf99cc9c389189f4137ca578a5abb1556bfb733d3 (patch)
treea495c7532648cdf5b6ad5275822cbcef4f4e7c9a
parenta06e49cf108488a30c0bdb168ada7653a3a737e0 (diff)
downloadCMake-f99cc9c389189f4137ca578a5abb1556bfb733d3.zip
CMake-f99cc9c389189f4137ca578a5abb1556bfb733d3.tar.gz
CMake-f99cc9c389189f4137ca578a5abb1556bfb733d3.tar.bz2
Tolerate symlinks during RPATH ordering (#13429)
On Arch Linux, /lib and /lib64 are symlinks to /usr/lib. When ordering runtime library search paths, we must not consider these to be distinct directories. Before considering conflicts between two directories, check that they do not have the same 'realpath'. Inspired-by: Myles English <mylesenglish@gmail.com>
-rw-r--r--Source/cmOrderDirectories.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/cmOrderDirectories.cxx b/Source/cmOrderDirectories.cxx
index 71a3497..007364c 100644
--- a/Source/cmOrderDirectories.cxx
+++ b/Source/cmOrderDirectories.cxx
@@ -72,7 +72,10 @@ public:
{
// Check if this directory conflicts with the entry.
std::string const& dir = this->OD->OriginalDirectories[i];
- if(dir != this->Directory && this->FindConflict(dir))
+ if(dir != this->Directory &&
+ cmSystemTools::GetRealPath(dir) !=
+ cmSystemTools::GetRealPath(this->Directory) &&
+ this->FindConflict(dir))
{
// The library will be found in this directory but this is not
// the directory named for it. Add an entry to make sure the
@@ -90,7 +93,10 @@ public:
{
// Check if this directory conflicts with the entry.
std::string const& dir = this->OD->OriginalDirectories[i];
- if(dir != this->Directory && this->FindConflict(dir))
+ if(dir != this->Directory &&
+ cmSystemTools::GetRealPath(dir) !=
+ cmSystemTools::GetRealPath(this->Directory) &&
+ this->FindConflict(dir))
{
// The library will be found in this directory but it is
// supposed to be found in an implicit search directory.