summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeLinkInformation.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-01-23 15:21:08 (GMT)
committerBrad King <brad.king@kitware.com>2008-01-23 15:21:08 (GMT)
commit72a301f88008c3d98c4ae1f263084763dc662b31 (patch)
tree5077d05a7848b6481398ed3ff27762f0b5fb495f /Source/cmComputeLinkInformation.cxx
parente417fb7100efda97d78dc20c542667b085a662b4 (diff)
downloadCMake-72a301f88008c3d98c4ae1f263084763dc662b31.zip
CMake-72a301f88008c3d98c4ae1f263084763dc662b31.tar.gz
CMake-72a301f88008c3d98c4ae1f263084763dc662b31.tar.bz2
BUG: Be less aggressive about finding conflicts in the runtime path when the real soname is not known.
Diffstat (limited to 'Source/cmComputeLinkInformation.cxx')
-rw-r--r--Source/cmComputeLinkInformation.cxx19
1 files changed, 5 insertions, 14 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index b7305f4..d5df212 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -1083,13 +1083,10 @@ void cmComputeLinkInformation::FindDirectoriesForLib(unsigned int lri)
(this->GlobalGenerator
->GetDirectoryContent(this->RuntimeDirectories[i], true));
- // Get the extension which should appear in the soname.
- std::string ext =
- cmSystemTools::GetFilenameLastExtension(re.FileName);
-
- // Get the set of files that might conflict.
- std::string base =
- cmSystemTools::GetFilenameWithoutLastExtension(re.FileName);
+ // Get the set of files that might conflict. Since we do not
+ // know the soname just look at all files that start with the
+ // file name. Usually the soname starts with the library name.
+ std::string base = re.FileName;
std::set<cmStdString>::const_iterator first = files.lower_bound(base);
++base[base.size()-1];
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;
!found && fi != last; ++fi)
{
- // This file name starts with the name of the library file.
- // 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;
- }
+ found = true;
}
if(found)