diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-01-09 20:13:26 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-01-09 20:13:26 (GMT) |
commit | 26f072dfe111164e7cd1f879a7483939ae3b0a19 (patch) | |
tree | a2d634f9b6d221cb6e8722e41d9205fdc0f3c542 /Source | |
parent | d786780ccba33580128b9db853fe114fdc818df9 (diff) | |
download | CMake-26f072dfe111164e7cd1f879a7483939ae3b0a19.zip CMake-26f072dfe111164e7cd1f879a7483939ae3b0a19.tar.gz CMake-26f072dfe111164e7cd1f879a7483939ae3b0a19.tar.bz2 |
BUG: look for -l and -L only at the begining of a link string
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmUnixMakefileGenerator.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx index 218d197..3363362 100644 --- a/Source/cmUnixMakefileGenerator.cxx +++ b/Source/cmUnixMakefileGenerator.cxx @@ -154,7 +154,8 @@ void cmUnixMakefileGenerator::OutputMakefile(const char* file) std::vector<std::string>& libdirs = m_Makefile->GetLinkDirectories(); for(j = libdirs.begin(); j != libdirs.end(); ++j) { - if((*j).find("-L") == std::string::npos + std::string::size_type pos = (*j).find("-L"); + if((pos == std::string::npos || pos > 0) && (*j).find("${") == std::string::npos) { linkLibs += "-L"; @@ -165,7 +166,8 @@ void cmUnixMakefileGenerator::OutputMakefile(const char* file) std::vector<std::string>& libs = m_Makefile->GetLinkLibraries(); for(j = libs.begin(); j != libs.end(); ++j) { - if((*j).find("-l") == std::string::npos + std::string::size_type pos = (*j).find("-l"); + if((pos == std::string::npos || pos > 0) && (*j).find("${") == std::string::npos) { linkLibs += "-l"; |