diff options
author | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-11-27 10:09:19 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@digia.com> | 2013-11-27 12:36:53 +0100 |
commit | b794a2af28e469669ec90c4d5e3954c176c9c653 (patch) | |
tree | 838b23f0d36b5ce8632e1717895082983c487b0b | |
parent | cddb39aceb0dd74d19895743f822c7eab9724e54 (diff) | |
download | qbs-b794a2af28e469669ec90c4d5e3954c176c9c653.tar.gz |
ensure the same working dir for all MSVC compiler calls
Per product, the working dir for MSVC compiler calls must remain the
same, because the calls share the file vc110.pdb (the exact file
name depends on the VS version).
Task-number: QBS-398
Change-Id: Idb865eb11f648e8103d91ae8a9fd43ecb9dc8a46
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
-rw-r--r-- | share/qbs/modules/cpp/msvc.js | 2 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata/precompiledHeader/myobject.h | 5 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata/precompiledHeader/precompiledHeader.qbs | 1 |
3 files changed, 6 insertions, 2 deletions
diff --git a/share/qbs/modules/cpp/msvc.js b/share/qbs/modules/cpp/msvc.js index 9c2aefe19..926c9fe62 100644 --- a/share/qbs/modules/cpp/msvc.js +++ b/share/qbs/modules/cpp/msvc.js @@ -107,7 +107,7 @@ function prepareCompiler(product, input, outputs, platformDefines, defines, incl if (pchOutput) cmd.description += ' (' + tag + ')'; cmd.highlight = "compiler"; - cmd.workingDirectory = FileInfo.path(objOutput.fileName) + cmd.workingDirectory = product.buildDirectory + "/.obj/" + product.name; cmd.responseFileUsagePrefix = '@'; // cl.exe outputs the cpp file name. We filter that out. cmd.stdoutFilterFunction = "function(output) {"; diff --git a/tests/auto/blackbox/testdata/precompiledHeader/myobject.h b/tests/auto/blackbox/testdata/precompiledHeader/myobject.h index 17dfd48c8..376f0da66 100644 --- a/tests/auto/blackbox/testdata/precompiledHeader/myobject.h +++ b/tests/auto/blackbox/testdata/precompiledHeader/myobject.h @@ -1,8 +1,11 @@ #ifndef MYOBJECT_H #define MYOBJECT_H -class MyObject +#include <QtCore/QObject> + +class MyObject : public QObject { + Q_OBJECT public: MyObject(); ~MyObject(); diff --git a/tests/auto/blackbox/testdata/precompiledHeader/precompiledHeader.qbs b/tests/auto/blackbox/testdata/precompiledHeader/precompiledHeader.qbs index 8252dc649..de65b9330 100644 --- a/tests/auto/blackbox/testdata/precompiledHeader/precompiledHeader.qbs +++ b/tests/auto/blackbox/testdata/precompiledHeader/precompiledHeader.qbs @@ -9,5 +9,6 @@ Product { "myobject.cpp"] Depends { name: "cpp" } cpp.precompiledHeader: "stable.h" + Depends { name: "Qt.core" } } |