summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2001-09-10 19:11:15 (GMT)
committerKen Martin <ken.martin@kitware.com>2001-09-10 19:11:15 (GMT)
commit0fe42a98572f2339ee763a475ecdd003c8a80ac8 (patch)
tree26a6c316b460bbb65de5a7d4a826d38ae9086696 /Source/cmSystemTools.cxx
parent5acb894e585f6f65741c102e74fd826b2250eb11 (diff)
downloadCMake-0fe42a98572f2339ee763a475ecdd003c8a80ac8.zip
CMake-0fe42a98572f2339ee763a475ecdd003c8a80ac8.tar.gz
CMake-0fe42a98572f2339ee763a475ecdd003c8a80ac8.tar.bz2
various windows fixes
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 22898ad..245b084 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -341,9 +341,16 @@ std::string cmSystemTools::EscapeSpaces(const char* str)
#if defined(_WIN32) && !defined(__CYGWIN__)
std::string result;
- result = "\"";
- result += cmSystemTools::HandleNetworkPaths(str);
- return result+"\"";
+ // if there are spaces
+ std::string temp = str;
+ if (temp.find(" ") != std::string::npos)
+ {
+ result = "\"";
+ result += cmSystemTools::HandleNetworkPaths(str);
+ return result+"\"";
+ }
+ return cmSystemTools::HandleNetworkPaths(str);
+
#else
std::string result = "";
for(const char* ch = str; *ch != '\0'; ++ch)