From 4b9858ab8ff94e093af26fcbcb6e15eb6bc2275b Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 27 Nov 2013 10:37:41 +0100 Subject: 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 --- share/qbs/modules/cpp/msvc.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3