diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-05-18 20:45:53 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-05-18 20:45:53 (GMT) |
commit | 8798d52790391effea70d6990e0d7ee3a3dd309e (patch) | |
tree | 2bfffadce58331ec85c39ff3598f426f16ec341a /Source | |
parent | 05d4b9aafd43fb7a759dc79599645d3e703c044e (diff) | |
download | CMake-8798d52790391effea70d6990e0d7ee3a3dd309e.zip CMake-8798d52790391effea70d6990e0d7ee3a3dd309e.tar.gz CMake-8798d52790391effea70d6990e0d7ee3a3dd309e.tar.bz2 |
ENH: add support for X11
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmUnixMakefileGenerator.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx index 427df10..306da35 100644 --- a/Source/cmUnixMakefileGenerator.cxx +++ b/Source/cmUnixMakefileGenerator.cxx @@ -267,7 +267,9 @@ void cmUnixMakefileGenerator::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 - if(lib->first.find('/') != std::string::npos) + cmRegularExpression reg("(^[ \t]*\\-l)|(\\${)"); + if(lib->first.find('/') != std::string::npos + && !reg.find(lib->first)) { std::string dir, file; cmSystemTools::SplitProgramPath(lib->first.c_str(), @@ -286,9 +288,7 @@ void cmUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout, // not a full path, so add -l name else { - std::string::size_type pos = lib->first.find("-l"); - if((pos == std::string::npos || pos > 0) - && lib->first.find("${") == std::string::npos) + if(!reg.find(lib->first)) { librariesLinked += "-l"; } |