BUG: look for -l and -L only at the begining of a link string
This commit is contained in:
parent
d786780ccb
commit
26f072dfe1
|
@ -154,7 +154,8 @@ void cmUnixMakefileGenerator::OutputMakefile(const char* file)
|
||||||
std::vector<std::string>& libdirs = m_Makefile->GetLinkDirectories();
|
std::vector<std::string>& libdirs = m_Makefile->GetLinkDirectories();
|
||||||
for(j = libdirs.begin(); j != libdirs.end(); ++j)
|
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)
|
&& (*j).find("${") == std::string::npos)
|
||||||
{
|
{
|
||||||
linkLibs += "-L";
|
linkLibs += "-L";
|
||||||
|
@ -165,7 +166,8 @@ void cmUnixMakefileGenerator::OutputMakefile(const char* file)
|
||||||
std::vector<std::string>& libs = m_Makefile->GetLinkLibraries();
|
std::vector<std::string>& libs = m_Makefile->GetLinkLibraries();
|
||||||
for(j = libs.begin(); j != libs.end(); ++j)
|
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)
|
&& (*j).find("${") == std::string::npos)
|
||||||
{
|
{
|
||||||
linkLibs += "-l";
|
linkLibs += "-l";
|
||||||
|
|
Loading…
Reference in New Issue