summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-05-09 20:17:03 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-05-09 20:17:03 (GMT)
commit02bdff675d2ebf619be205680a9c4b70200c360c (patch)
tree1f2314245b659fa477d74844b9a46332601da417 /Source
parent013b9b38495c9c7326ab099b73c777f0f5a28d52 (diff)
downloadCMake-02bdff675d2ebf619be205680a9c4b70200c360c.zip
CMake-02bdff675d2ebf619be205680a9c4b70200c360c.tar.gz
CMake-02bdff675d2ebf619be205680a9c4b70200c360c.tar.bz2
BUG: escape spaces before adding .lib
Diffstat (limited to 'Source')
-rw-r--r--Source/cmDSPMakefile.cxx26
-rw-r--r--Source/cmDSPWriter.cxx26
2 files changed, 20 insertions, 32 deletions
diff --git a/Source/cmDSPMakefile.cxx b/Source/cmDSPMakefile.cxx
index 9d33640..e1babf3 100644
--- a/Source/cmDSPMakefile.cxx
+++ b/Source/cmDSPMakefile.cxx
@@ -439,36 +439,30 @@ void cmDSPMakefile::WriteDSPHeader(std::ostream& fout, const char *libName,
if (!target.GetType() == cmTarget::LIBRARY ||
(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)
{
libOptions += " ";
- libOptions += cmSystemTools::EscapeSpaces(j->first.c_str());
- if(j->first.find(".lib") == std::string::npos)
- {
- libOptions += ".lib ";
- }
+ libOptions += lib;
}
if (j->second == cmTarget::DEBUG)
{
libDebugOptions += " ";
- libDebugOptions += cmSystemTools::EscapeSpaces(j->first.c_str());
- if(j->first.find(".lib") == std::string::npos)
- {
- libDebugOptions += ".lib ";
- }
+ libDebugOptions += lib;
}
if (j->second == cmTarget::OPTIMIZED)
{
libOptimizedOptions += " ";
- libOptimizedOptions += cmSystemTools::EscapeSpaces(j->first.c_str());
- 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());
if(!fin)
diff --git a/Source/cmDSPWriter.cxx b/Source/cmDSPWriter.cxx
index 9d33640..e1babf3 100644
--- a/Source/cmDSPWriter.cxx
+++ b/Source/cmDSPWriter.cxx
@@ -439,36 +439,30 @@ void cmDSPMakefile::WriteDSPHeader(std::ostream& fout, const char *libName,
if (!target.GetType() == cmTarget::LIBRARY ||
(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)
{
libOptions += " ";
- libOptions += cmSystemTools::EscapeSpaces(j->first.c_str());
- if(j->first.find(".lib") == std::string::npos)
- {
- libOptions += ".lib ";
- }
+ libOptions += lib;
}
if (j->second == cmTarget::DEBUG)
{
libDebugOptions += " ";
- libDebugOptions += cmSystemTools::EscapeSpaces(j->first.c_str());
- if(j->first.find(".lib") == std::string::npos)
- {
- libDebugOptions += ".lib ";
- }
+ libDebugOptions += lib;
}
if (j->second == cmTarget::OPTIMIZED)
{
libOptimizedOptions += " ";
- libOptimizedOptions += cmSystemTools::EscapeSpaces(j->first.c_str());
- 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());
if(!fin)