BUG: Be less aggressive about finding conflicts in the runtime path when the real soname is not known.

This commit is contained in:
Brad King 2008-01-23 10:21:08 -05:00
parent e417fb7100
commit 72a301f880
1 changed files with 5 additions and 14 deletions

View File

@ -1083,13 +1083,10 @@ void cmComputeLinkInformation::FindDirectoriesForLib(unsigned int lri)
(this->GlobalGenerator (this->GlobalGenerator
->GetDirectoryContent(this->RuntimeDirectories[i], true)); ->GetDirectoryContent(this->RuntimeDirectories[i], true));
// Get the extension which should appear in the soname. // Get the set of files that might conflict. Since we do not
std::string ext = // know the soname just look at all files that start with the
cmSystemTools::GetFilenameLastExtension(re.FileName); // file name. Usually the soname starts with the library name.
std::string base = re.FileName;
// Get the set of files that might conflict.
std::string base =
cmSystemTools::GetFilenameWithoutLastExtension(re.FileName);
std::set<cmStdString>::const_iterator first = files.lower_bound(base); std::set<cmStdString>::const_iterator first = files.lower_bound(base);
++base[base.size()-1]; ++base[base.size()-1];
std::set<cmStdString>::const_iterator last = files.upper_bound(base); std::set<cmStdString>::const_iterator last = files.upper_bound(base);
@ -1097,13 +1094,7 @@ void cmComputeLinkInformation::FindDirectoriesForLib(unsigned int lri)
for(std::set<cmStdString>::const_iterator fi = first; for(std::set<cmStdString>::const_iterator fi = first;
!found && fi != last; ++fi) !found && fi != last; ++fi)
{ {
// This file name starts with the name of the library file. found = true;
// If the name also contains the extension then this is
// possibly an soname of the library.
if(fi->find(ext, base.size()) != fi->npos)
{
found = true;
}
} }
if(found) if(found)