From 2cc47b5c02608265032f9db91a220422d31e5946 Mon Sep 17 00:00:00 2001 From: Guenter Obiltschnig Date: Sun, 18 Nov 2012 23:00:55 +0100 Subject: [PATCH] on Windows, quote the path passed to the compiler --- CppParser/src/Utility.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CppParser/src/Utility.cpp b/CppParser/src/Utility.cpp index 68c22a839..8158bfbf7 100644 --- a/CppParser/src/Utility.cpp +++ b/CppParser/src/Utility.cpp @@ -1,7 +1,7 @@ // // Utility.cpp // -// $Id: //poco/1.4/CppParser/src/Utility.cpp#2 $ +// $Id: //poco/1.4/CppParser/src/Utility.cpp#3 $ // // Library: CppParser // Package: CppParser @@ -202,8 +202,14 @@ std::string Utility::preprocessFile(const std::string& file, const std::string& } StringTokenizer tokenizer(popts, ",;\n", StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM); std::vector args(tokenizer.begin(), tokenizer.end()); +#ifdef _WIN32 + std::string quotedFile("\""); + quotedFile += file; + quotedFile += "\""; + args.push_back(quotedFile); +#else args.push_back(file); - +#endif if (!path.empty()) { std::string newPath(Environment::get("PATH"));