aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2022-12-23 14:11:22 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2022-12-24 09:08:55 +0000
commitbf356f6ef2ef5440d81b69c162c03cc778274bf5 (patch)
tree1f71c5aac7098879027f436b416b2ee600739fc0
parentdad9eba20fbfba7993759b8013d2b9dfad1b3a9f (diff)
IAR: Fix compiler macros and include paths retrieval
Written-by: Denis Shienkov <denis.shienkov@gmail.com> Change-Id: I2a11dcd11a98300035ccac8d5872d15f46d18299 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
-rw-r--r--share/qbs/modules/cpp/iar.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/share/qbs/modules/cpp/iar.js b/share/qbs/modules/cpp/iar.js
index d5f019cbc..ed58ac262 100644
--- a/share/qbs/modules/cpp/iar.js
+++ b/share/qbs/modules/cpp/iar.js
@@ -450,6 +450,7 @@ function dumpMacros(compilerFilePath, tag) {
args.push(cppLanguageOption(compilerFilePath));
var p = new Process();
+ p.setWorkingDirectory(tempDir.path());
p.exec(compilerFilePath, args, true);
var outFile = new TextFile(outFilePath, TextFile.ReadOnly);
return Cpp.extractMacros(outFile.readAll());
@@ -471,6 +472,7 @@ function dumpCompilerIncludePaths(compilerFilePath, tag) {
var includePaths = [];
var p = new Process();
+ p.setWorkingDirectory(tempDir.path());
// It is possible that the process can return an error code in case the
// compiler does not support the `--IDE3` flag. So, don't throw an error in this case.
p.exec(compilerFilePath, args, false);