Browse Source

BUG: Fixed logic that splits a full path library link into the -L and -l pieces to not write out a -l by itself if the file regular expression does not match.

Brad King 24 years ago
parent
commit
c60696ccaf
1 changed files with 3 additions and 3 deletions
  1. 3 3
      Source/cmUnixMakefileGenerator.cxx

+ 3 - 3
Source/cmUnixMakefileGenerator.cxx

@@ -292,14 +292,14 @@ void cmUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
         linkLibs += libpath;
         linkLibs += " ";
         }
-      librariesLinked += "-l";
       cmRegularExpression libname("lib(.*)\\.(.*)");
       if(libname.find(file))
         {
+        librariesLinked += "-l";
         file = libname.match(1);
+	librariesLinked += file;
+        librariesLinked += " ";
         }
-      librariesLinked += file;
-      librariesLinked += " ";
       }
     // not a full path, so add -l name
     else