BUG: escape spaces before adding .lib

This commit is contained in:
Bill Hoffman 2001-05-09 16:17:03 -04:00
parent 013b9b3849
commit 02bdff675d
2 changed files with 20 additions and 32 deletions

View File

@ -439,36 +439,30 @@ void cmDSPMakefile::WriteDSPHeader(std::ostream& fout, const char *libName,
if (!target.GetType() == cmTarget::LIBRARY || if (!target.GetType() == cmTarget::LIBRARY ||
(m_LibraryBuildType == DLL && libName != j->first)) (m_LibraryBuildType == DLL && libName != j->first))
{ {
std::string lib = j->first;
if(j->first.find(".lib") == std::string::npos)
{
lib += ".lib";
}
lib = cmSystemTools::EscapeSpaces(lib.c_str());
if (j->second == cmTarget::GENERAL) if (j->second == cmTarget::GENERAL)
{ {
libOptions += " "; libOptions += " ";
libOptions += cmSystemTools::EscapeSpaces(j->first.c_str()); libOptions += lib;
if(j->first.find(".lib") == std::string::npos)
{
libOptions += ".lib ";
}
} }
if (j->second == cmTarget::DEBUG) if (j->second == cmTarget::DEBUG)
{ {
libDebugOptions += " "; libDebugOptions += " ";
libDebugOptions += cmSystemTools::EscapeSpaces(j->first.c_str()); libDebugOptions += lib;
if(j->first.find(".lib") == std::string::npos)
{
libDebugOptions += ".lib ";
}
} }
if (j->second == cmTarget::OPTIMIZED) if (j->second == cmTarget::OPTIMIZED)
{ {
libOptimizedOptions += " "; libOptimizedOptions += " ";
libOptimizedOptions += cmSystemTools::EscapeSpaces(j->first.c_str()); libOptimizedOptions += lib;
if(j->first.find(".lib") == std::string::npos)
{
libOptimizedOptions += ".lib ";
} }
} }
} }
} libOptions += " /STACK:10000000 ";
libOptions += "/STACK:10000000 ";
std::ifstream fin(m_DSPHeaderTemplate.c_str()); std::ifstream fin(m_DSPHeaderTemplate.c_str());
if(!fin) if(!fin)

View File

@ -439,36 +439,30 @@ void cmDSPMakefile::WriteDSPHeader(std::ostream& fout, const char *libName,
if (!target.GetType() == cmTarget::LIBRARY || if (!target.GetType() == cmTarget::LIBRARY ||
(m_LibraryBuildType == DLL && libName != j->first)) (m_LibraryBuildType == DLL && libName != j->first))
{ {
std::string lib = j->first;
if(j->first.find(".lib") == std::string::npos)
{
lib += ".lib";
}
lib = cmSystemTools::EscapeSpaces(lib.c_str());
if (j->second == cmTarget::GENERAL) if (j->second == cmTarget::GENERAL)
{ {
libOptions += " "; libOptions += " ";
libOptions += cmSystemTools::EscapeSpaces(j->first.c_str()); libOptions += lib;
if(j->first.find(".lib") == std::string::npos)
{
libOptions += ".lib ";
}
} }
if (j->second == cmTarget::DEBUG) if (j->second == cmTarget::DEBUG)
{ {
libDebugOptions += " "; libDebugOptions += " ";
libDebugOptions += cmSystemTools::EscapeSpaces(j->first.c_str()); libDebugOptions += lib;
if(j->first.find(".lib") == std::string::npos)
{
libDebugOptions += ".lib ";
}
} }
if (j->second == cmTarget::OPTIMIZED) if (j->second == cmTarget::OPTIMIZED)
{ {
libOptimizedOptions += " "; libOptimizedOptions += " ";
libOptimizedOptions += cmSystemTools::EscapeSpaces(j->first.c_str()); libOptimizedOptions += lib;
if(j->first.find(".lib") == std::string::npos)
{
libOptimizedOptions += ".lib ";
} }
} }
} }
} libOptions += " /STACK:10000000 ";
libOptions += "/STACK:10000000 ";
std::ifstream fin(m_DSPHeaderTemplate.c_str()); std::ifstream fin(m_DSPHeaderTemplate.c_str());
if(!fin) if(!fin)