diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2017-11-15 21:31:30 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2017-11-30 08:30:42 +0000 |
commit | e32812d1d2e59e17697c8b8c6375a18556175b54 (patch) | |
tree | 5be8d49424d06ce8167ebd51ae6d740985f524b1 /config.tests/x86_simd | |
parent | e1600c1a73e0594f5fbea8f7341a9552d6ae3fbb (diff) | |
download | qtbase-e32812d1d2e59e17697c8b8c6375a18556175b54.tar.gz |
Centralize the x86 SIMD testing in one place
Since the x86_simd/main.cpp file already has all the source for each and
every test anyway, just reuse it.
Change-Id: I938b024e38bf4aac9154fffd14f779f450827fb9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'config.tests/x86_simd')
-rw-r--r-- | config.tests/x86_simd/main.cpp | 2 | ||||
-rw-r--r-- | config.tests/x86_simd/x86_simd.pro | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/config.tests/x86_simd/main.cpp b/config.tests/x86_simd/main.cpp index 6005f5b023..8120cb9d3f 100644 --- a/config.tests/x86_simd/main.cpp +++ b/config.tests/x86_simd/main.cpp @@ -41,7 +41,7 @@ #include <immintrin.h> #define T(x) (QT_COMPILER_SUPPORTS_ ## x) -#if !defined(__INTEL_COMPILER) && !defined(_MSC_VER) +#if !defined(__INTEL_COMPILER) && !defined(_MSC_VER) && !defined(NO_ATTRIBUTE) /* GCC requires attributes for a function */ # define attribute_target(x) __attribute__((__target__(x))) #else diff --git a/config.tests/x86_simd/x86_simd.pro b/config.tests/x86_simd/x86_simd.pro index 52c24c24a8..5751432980 100644 --- a/config.tests/x86_simd/x86_simd.pro +++ b/config.tests/x86_simd/x86_simd.pro @@ -2,4 +2,10 @@ SOURCES = main.cpp for (config, SIMD) { uc = $$upper($$config) DEFINES += QT_COMPILER_SUPPORTS_$${uc} + + add_cflags { + cflags = QMAKE_CFLAGS_$${uc} + !defined($$cflags, var): error("This compiler does not support $${uc}") + QMAKE_CXXFLAGS += $$eval($$cflags) + } } |