diff options
author | Brad King <brad.king@kitware.com> | 2001-04-09 14:31:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2001-04-09 14:31:36 (GMT) |
commit | e0da3ef275682626ec2e23d1abd6cca752882b47 (patch) | |
tree | 9a0e8ed9cc7a7fc8c3c07d89f255e08c33d257bb /Source/cmSystemTools.cxx | |
parent | e7bd5fcd19064480142aae2928189dc822fad47c (diff) | |
download | CMake-e0da3ef275682626ec2e23d1abd6cca752882b47.zip CMake-e0da3ef275682626ec2e23d1abd6cca752882b47.tar.gz CMake-e0da3ef275682626ec2e23d1abd6cca752882b47.tar.bz2 |
ERR: Corrected use of double-quotes to be compatible with UNIX make. Now double quotes (windows) or escape sequences for spaces (unix) are added when dependencies are output.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index a606bb4..957ee46 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -129,6 +129,22 @@ void cmSystemTools::ReplaceString(std::string& source, } } + +std::string cmSystemTools::EscapeSpaces(const char* str) +{ + std::string result = ""; + for(const char* ch = str; *ch != '\0'; ++ch) + { + if(*ch == ' ') + { + result += '\\'; + } + result += *ch; + } + return result; +} + + // return true if the file exists bool cmSystemTools::FileExists(const char* filename) { |