[cmake-commits] king committed cmComputeLinkInformation.cxx 1.2 1.3

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Jan 23 10:21:10 EST 2008


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv24598

Modified Files:
	cmComputeLinkInformation.cxx 
Log Message:
BUG: Be less aggressive about finding conflicts in the runtime path when the real soname is not known.


Index: cmComputeLinkInformation.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmComputeLinkInformation.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cmComputeLinkInformation.cxx	22 Jan 2008 15:05:27 -0000	1.2
+++ cmComputeLinkInformation.cxx	23 Jan 2008 15:21:08 -0000	1.3
@@ -1083,13 +1083,10 @@
         (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 @@
       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)



More information about the Cmake-commits mailing list