summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2001-05-04 14:44:59 (GMT)
committerBrad King <brad.king@kitware.com>2001-05-04 14:44:59 (GMT)
commit33e1a4a09aaedfcb869e2f4217815e09f0d3187f (patch)
treeb89203c63dea7e08556b4430ccd3b6708fd49329
parent6c54371c8f0c341fff060ddf02ed0ba5ea37d25f (diff)
downloadCMake-33e1a4a09aaedfcb869e2f4217815e09f0d3187f.zip
CMake-33e1a4a09aaedfcb869e2f4217815e09f0d3187f.tar.gz
CMake-33e1a4a09aaedfcb869e2f4217815e09f0d3187f.tar.bz2
ENH: Added support to EscapeSpaces to use double quotes on windows.
-rw-r--r--Source/cmSystemTools.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 0a2ff79..9883621 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -174,6 +174,10 @@ void cmSystemTools::ReplaceString(std::string& source,
std::string cmSystemTools::EscapeSpaces(const char* str)
{
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ std::string result = str;
+ return "\""+result+"\"";
+#else
std::string result = "";
for(const char* ch = str; *ch != '\0'; ++ch)
{
@@ -184,6 +188,7 @@ std::string cmSystemTools::EscapeSpaces(const char* str)
result += *ch;
}
return result;
+#endif
}