aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata-baremetal
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2021-01-29 16:06:44 +0300
committerDenis Shienkov <denis.shienkov@gmail.com>2021-02-02 08:15:11 +0000
commit0d0acf7d4dfaedce6d849d2db4613ca8a4e9952b (patch)
tree8b2a496cf87aeb2898acff9504c7acc91c7c94b8 /tests/auto/blackbox/testdata-baremetal
parent9c547478870237086578ebec430698f28e7c14e9 (diff)
baremetal: Improve detection of IAR compiler includes
The IAR compiler has an undocumented command line option `--IDE3`, which allows you to print a list of compiler include paths as: `$$TOOL_BEGIN $$VERSION "3" $$INC_BEGIN $$FILEPATH "<path\\to\\directory>" $$TOOL_END` Besides, the same approach is used in the IAR extension for the VSCode IDE. So we can use this approach to implement it the Qbs module as well. In addition, this commit contains an autotest to check the `cpp.compilerIncludePaths` property. Change-Id: I434dd630913e5afd6cba5b4e31e1021ee0c5fe31 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Diffstat (limited to 'tests/auto/blackbox/testdata-baremetal')
-rw-r--r--tests/auto/blackbox/testdata-baremetal/compiler-include-paths/compiler-include-paths.qbs9
-rw-r--r--tests/auto/blackbox/testdata-baremetal/compiler-include-paths/main.c4
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata-baremetal/compiler-include-paths/compiler-include-paths.qbs b/tests/auto/blackbox/testdata-baremetal/compiler-include-paths/compiler-include-paths.qbs
new file mode 100644
index 000000000..5c73302ad
--- /dev/null
+++ b/tests/auto/blackbox/testdata-baremetal/compiler-include-paths/compiler-include-paths.qbs
@@ -0,0 +1,9 @@
+import "../BareMetalApplication.qbs" as BareMetalApplication
+
+BareMetalApplication {
+ files: ["main.c"]
+ property bool dummy: {
+ console.info("compilerIncludePaths: %%" + cpp.compilerIncludePaths + "%%");
+ return true;
+ }
+}
diff --git a/tests/auto/blackbox/testdata-baremetal/compiler-include-paths/main.c b/tests/auto/blackbox/testdata-baremetal/compiler-include-paths/main.c
new file mode 100644
index 000000000..58fe69254
--- /dev/null
+++ b/tests/auto/blackbox/testdata-baremetal/compiler-include-paths/main.c
@@ -0,0 +1,4 @@
+int main(void)
+{
+ return 0;
+}