aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2020-03-07 14:11:10 +0100
committerIvan Komissarov <ABBAPOH@gmail.com>2020-03-11 12:57:22 +0000
commitca00d222003c2cfb216a8ecd16f21462d33b324e (patch)
tree3175db0e46a9d9f51da04714dc9682f58df22898 /tests/auto/blackbox/testdata
parentadd8aab4bdcd07c7b08a13b1be1984ba807bdf50 (diff)
Add qbs.hostArchitecture property
This property can be useful when some parts of the project (e.g. helper tools) should be compiled for the host platform/architecture disregarding what targetPlatform/architecture the rest of the project is being built for Change-Id: I8c76ef65470130df59826603157083fd20809592 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests/auto/blackbox/testdata')
-rw-r--r--tests/auto/blackbox/testdata/host-os-properties/host-os-properties.qbs8
-rw-r--r--tests/auto/blackbox/testdata/host-os-properties/main.cpp7
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/host-os-properties/host-os-properties.qbs b/tests/auto/blackbox/testdata/host-os-properties/host-os-properties.qbs
new file mode 100644
index 000000000..b6b862d1c
--- /dev/null
+++ b/tests/auto/blackbox/testdata/host-os-properties/host-os-properties.qbs
@@ -0,0 +1,8 @@
+CppApplication {
+ consoleApplication: true
+ cpp.defines: [
+ 'HOST_ARCHITECTURE="' + qbs.hostArchitecture + '"',
+ 'HOST_PLATFORM="' + qbs.hostPlatform + '"'
+ ]
+ files: "main.cpp"
+}
diff --git a/tests/auto/blackbox/testdata/host-os-properties/main.cpp b/tests/auto/blackbox/testdata/host-os-properties/main.cpp
new file mode 100644
index 000000000..b0c239e20
--- /dev/null
+++ b/tests/auto/blackbox/testdata/host-os-properties/main.cpp
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int main() {
+ printf("HOST_ARCHITECTURE = %s\n", HOST_ARCHITECTURE);
+ printf("HOST_PLATFORM = %s\n", HOST_PLATFORM);
+ return 0;
+}