diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2021-01-29 18:03:05 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2021-02-01 16:13:03 +0000 |
commit | 9c547478870237086578ebec430698f28e7c14e9 (patch) | |
tree | 0d84020f617517df4cd7513fde52942c2741cc96 /share/qbs | |
parent | 55337b8ceb042fa3df89629f0c3d96d04e008270 (diff) |
baremetal: Return only existing SDCC compiler include paths
For some architectures, the compiler may return nonexistent
header paths. For example, for the `stm8` architecture, it
returns the path:
c:\Program Files (x86)\SDCC\bin\..\include\stm8
which is not present on the file system.
This can be confusing intellisense for IDEs, and will also
make it harder to write tests for `cpp.compilerIncludePaths`
property.
So, it makes sense to return only existing paths.
Change-Id: Ibe7078485db900eba2e17710e5de0abeda28f645
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share/qbs')
-rw-r--r-- | share/qbs/modules/cpp/sdcc.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/share/qbs/modules/cpp/sdcc.js b/share/qbs/modules/cpp/sdcc.js index 36454031e..1fa5f0472 100644 --- a/share/qbs/modules/cpp/sdcc.js +++ b/share/qbs/modules/cpp/sdcc.js @@ -142,7 +142,8 @@ function dumpDefaultPaths(compilerFilePath, architecture) { || line.startsWith("libpath:")) { addIncludePaths = false; } else if (addIncludePaths) { - includePaths.push(line); + if (File.exists(line)) + includePaths.push(line); } } |