summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorJohn Biddiscombe <jbiddiscombe@skippingmouse.co.uk>2001-09-12 01:45:35 (GMT)
committerJohn Biddiscombe <jbiddiscombe@skippingmouse.co.uk>2001-09-12 01:45:35 (GMT)
commit7adaefb40346c133fadcf2c1c37780e5e051bb61 (patch)
treee1e6210a561935d99424285285e999c60b411595 /Source/cmSystemTools.cxx
parent288287b3364363196c1150265ad3ec8b80b6aee4 (diff)
downloadCMake-7adaefb40346c133fadcf2c1c37780e5e051bb61.zip
CMake-7adaefb40346c133fadcf2c1c37780e5e051bb61.tar.gz
CMake-7adaefb40346c133fadcf2c1c37780e5e051bb61.tar.bz2
ERR: Change to EscapeSpaces forces rework of Borland generator <sigh>
Add clause to prevent adding quotes when they're already present, then stuff them onto all lib paths to prevent forward slashes causing trouble.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 795208d..fb2f297 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -345,9 +345,17 @@ std::string cmSystemTools::EscapeSpaces(const char* str)
std::string temp = str;
if (temp.find(" ") != std::string::npos)
{
- result = "\"";
+ // don't add quotes if they're already there
+ if (temp.find("\"")==std::string::npos)
+ {
+ result = "\"";
+ }
result += cmSystemTools::HandleNetworkPaths(str);
- return result+"\"";
+ if (temp.find("\"")==std::string::npos)
+ {
+ result += "\"";
+ }
+ return result;
}
return cmSystemTools::HandleNetworkPaths(str);