From e32812d1d2e59e17697c8b8c6375a18556175b54 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 15 Nov 2017 21:31:30 -0800 Subject: 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 --- config.tests/x86_simd/main.cpp | 2 +- config.tests/x86_simd/x86_simd.pro | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'config.tests/x86_simd') 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 #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) + } } -- cgit v1.2.3