aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata/cpu-features
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2017-08-01 15:08:51 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2017-08-28 08:40:16 +0000
commit40787b4d077eea1211f43d9f247c560957bd6887 (patch)
tree5e44c225aa4eddbb3c22ca0481524f6c875c3a5d /tests/auto/blackbox/testdata/cpu-features
parentd36064bc2e486d81e8403e45ddf91311aa066fdb (diff)
Introduce the cpufeatures module
Provides an abstraction for the respective compiler flags. The initial set of properties is the superset of what Qt can configure and what MSVC supports. Change-Id: I1be90361f2f104a55d2a784a69625396680b0713 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tests/auto/blackbox/testdata/cpu-features')
-rw-r--r--tests/auto/blackbox/testdata/cpu-features/cpu-features.qbs16
-rw-r--r--tests/auto/blackbox/testdata/cpu-features/main.cpp1
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/cpu-features/cpu-features.qbs b/tests/auto/blackbox/testdata/cpu-features/cpu-features.qbs
new file mode 100644
index 000000000..62f163a95
--- /dev/null
+++ b/tests/auto/blackbox/testdata/cpu-features/cpu-features.qbs
@@ -0,0 +1,16 @@
+import qbs
+
+CppApplication {
+ Depends { name: "cpufeatures" }
+ cpufeatures.x86_sse2: true
+ cpufeatures.x86_avx: true
+ cpufeatures.x86_avx512f: false
+
+ files: ["main.cpp"]
+ property bool dummy: {
+ console.info("is x86: " + (qbs.architecture === "x86"));
+ console.info("is x64: " + (qbs.architecture === "x86_64"));
+ console.info("is gcc: " + qbs.toolchain.contains("gcc"));
+ console.info("is msvc: " + qbs.toolchain.contains("msvc"));
+ }
+}
diff --git a/tests/auto/blackbox/testdata/cpu-features/main.cpp b/tests/auto/blackbox/testdata/cpu-features/main.cpp
new file mode 100644
index 000000000..237c8ce18
--- /dev/null
+++ b/tests/auto/blackbox/testdata/cpu-features/main.cpp
@@ -0,0 +1 @@
+int main() {}