aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2013-11-27 10:37:41 +0100
committerChristian Kandeler <christian.kandeler@digia.com>2013-11-27 12:17:31 +0100
commit4b9858ab8ff94e093af26fcbcb6e15eb6bc2275b (patch)
tree8445e1046877d8570b2088163b754adf26b85082
parentbd721ffc92ad2b47cacc3cac77fee11e6f3b12f5 (diff)
fix stdoutFilterFunction for MSVC PCHs
For some weird reason the MSVC compiler outputs the header file to be precompiled twice. We filter now all occurrences of the input file name from stdout. Change-Id: I4d0e60af02cc00e836eea278dbfdaf11f48c3432 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
-rw-r--r--share/qbs/modules/cpp/msvc.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/share/qbs/modules/cpp/msvc.js b/share/qbs/modules/cpp/msvc.js
index 01986c16e..9c2aefe19 100644
--- a/share/qbs/modules/cpp/msvc.js
+++ b/share/qbs/modules/cpp/msvc.js
@@ -111,7 +111,8 @@ function prepareCompiler(product, input, outputs, platformDefines, defines, incl
cmd.responseFileUsagePrefix = '@';
// cl.exe outputs the cpp file name. We filter that out.
cmd.stdoutFilterFunction = "function(output) {";
- cmd.stdoutFilterFunction += "return output.replace('" + FileInfo.fileName(input.fileName) + "\\r\\n', '');";
+ cmd.stdoutFilterFunction += "return output.replace(/"
+ + FileInfo.fileName(input.fileName) + "\\r\\n/g, '');";
cmd.stdoutFilterFunction += "}";
return cmd;
}