Merge topic 'tolerate-lib-dir-symlink'

f99cc9c3 Tolerate symlinks during RPATH ordering (#13429)
This commit is contained in:
Brad King 2014-09-10 11:23:12 -04:00 committed by CMake Topic Stage
commit cd0ead3c94
1 changed files with 8 additions and 2 deletions

View File

@ -72,7 +72,10 @@ public:
{ {
// Check if this directory conflicts with the entry. // Check if this directory conflicts with the entry.
std::string const& dir = this->OD->OriginalDirectories[i]; 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 library will be found in this directory but this is not
// the directory named for it. Add an entry to make sure the // 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. // Check if this directory conflicts with the entry.
std::string const& dir = this->OD->OriginalDirectories[i]; 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 // The library will be found in this directory but it is
// supposed to be found in an implicit search directory. // supposed to be found in an implicit search directory.