BUG: -l or whatever should be at beginning of line.

This commit is contained in:
Andy Cedilnik 2004-02-09 15:34:38 -05:00
parent 1061101745
commit 6720075f8b

View File

@ -747,7 +747,7 @@ void cmLocalUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
// if a variable expands to nothing.
if (lib->first.size() == 0) continue;
// if it is a full path break it into -L and -l
cmsys::RegularExpression reg("([ \t]*\\-l)|([ \t]*\\-framework)|(\\${)|([ \t]*\\-pthread)");
cmsys::RegularExpression reg("^([ \t]*\\-l)|([ \t]*\\-framework)|(\\${)|([ \t]*\\-pthread)");
if(lib->first.find('/') != std::string::npos
&& !reg.find(lib->first))
{