From c60696ccaf8a0d35a424389106d7d11c37248382 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 25 May 2001 14:27:30 -0400 Subject: [PATCH] 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. --- Source/cmUnixMakefileGenerator.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx index d6f073758..5038bde73 100644 --- a/Source/cmUnixMakefileGenerator.cxx +++ b/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