ENH: only add .lib if no .lib exists

This commit is contained in:
Bill Hoffman 2001-05-09 15:48:06 -04:00
parent f07ee5b817
commit e30a660df5
2 changed files with 24 additions and 6 deletions

View File

@ -443,22 +443,31 @@ void cmDSPMakefile::WriteDSPHeader(std::ostream& fout, const char *libName,
{ {
libOptions += " "; libOptions += " ";
libOptions += j->first; libOptions += j->first;
if(j->first.find(".lib") == std::string::npos)
{
libOptions += ".lib "; libOptions += ".lib ";
} }
}
if (j->second == cmTarget::DEBUG) if (j->second == cmTarget::DEBUG)
{ {
libDebugOptions += " "; libDebugOptions += " ";
libDebugOptions += j->first; libDebugOptions += j->first;
if(j->first.find(".lib") == std::string::npos)
{
libDebugOptions += ".lib "; libDebugOptions += ".lib ";
} }
}
if (j->second == cmTarget::OPTIMIZED) if (j->second == cmTarget::OPTIMIZED)
{ {
libOptimizedOptions += " "; libOptimizedOptions += " ";
libOptimizedOptions += j->first; libOptimizedOptions += j->first;
if(j->first.find(".lib") == std::string::npos)
{
libOptimizedOptions += ".lib "; libOptimizedOptions += ".lib ";
} }
} }
} }
}
libOptions += "/STACK:10000000 "; libOptions += "/STACK:10000000 ";
std::ifstream fin(m_DSPHeaderTemplate.c_str()); std::ifstream fin(m_DSPHeaderTemplate.c_str());

View File

@ -443,22 +443,31 @@ void cmDSPMakefile::WriteDSPHeader(std::ostream& fout, const char *libName,
{ {
libOptions += " "; libOptions += " ";
libOptions += j->first; libOptions += j->first;
if(j->first.find(".lib") == std::string::npos)
{
libOptions += ".lib "; libOptions += ".lib ";
} }
}
if (j->second == cmTarget::DEBUG) if (j->second == cmTarget::DEBUG)
{ {
libDebugOptions += " "; libDebugOptions += " ";
libDebugOptions += j->first; libDebugOptions += j->first;
if(j->first.find(".lib") == std::string::npos)
{
libDebugOptions += ".lib "; libDebugOptions += ".lib ";
} }
}
if (j->second == cmTarget::OPTIMIZED) if (j->second == cmTarget::OPTIMIZED)
{ {
libOptimizedOptions += " "; libOptimizedOptions += " ";
libOptimizedOptions += j->first; libOptimizedOptions += j->first;
if(j->first.find(".lib") == std::string::npos)
{
libOptimizedOptions += ".lib "; libOptimizedOptions += ".lib ";
} }
} }
} }
}
libOptions += "/STACK:10000000 "; libOptions += "/STACK:10000000 ";
std::ifstream fin(m_DSPHeaderTemplate.c_str()); std::ifstream fin(m_DSPHeaderTemplate.c_str());