summaryrefslogtreecommitdiffstats
path: root/Source/cmcldeps.cxx
diff options
context:
space:
mode:
authorPeter Kümmel <syntheticpp@gmx.net>2012-07-16 14:48:32 (GMT)
committerPeter Kümmel <syntheticpp@gmx.net>2012-07-16 14:48:32 (GMT)
commit1cdeef795a9765091027656e5b904059da8fc1b1 (patch)
treea55c59e9c3b924ff03a05e0e0b0b01e3ed63815e /Source/cmcldeps.cxx
parent84a18cb5d659602235cc995497f5fb016560d553 (diff)
downloadCMake-1cdeef795a9765091027656e5b904059da8fc1b1.zip
CMake-1cdeef795a9765091027656e5b904059da8fc1b1.tar.gz
CMake-1cdeef795a9765091027656e5b904059da8fc1b1.tar.bz2
Ninja: readd quotes to src file path before patching it
Diffstat (limited to 'Source/cmcldeps.cxx')
-rw-r--r--Source/cmcldeps.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmcldeps.cxx b/Source/cmcldeps.cxx
index f04ff87..69df88d 100644
--- a/Source/cmcldeps.cxx
+++ b/Source/cmcldeps.cxx
@@ -254,7 +254,10 @@ int main() {
// rc: /fo x.dir\x.rc.res -> cl: /out:x.dir\x.rc.res.dep.obj
clrest = replace(clrest, "/fo", "/out:");
clrest = replace(clrest, objfile, objfile + ".dep.obj ");
+
// rc: src\x\x.rc -> cl: /Tc src\x\x.rc
+ if (srcfile.find(" ") != std::string::npos)
+ srcfile = "\"" + srcfile + "\"";
clrest = replace(clrest, srcfile, "/Tc " + srcfile);
cl = "\"" + cl + "\" /P /DRC_INVOKED ";