diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2017-11-15 21:01:15 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2017-11-30 08:30:40 +0000 |
commit | a09fc184acd0874ea9876cdb2c4b123b226d8587 (patch) | |
tree | c3808834554d1de1411ef115863dc60482551c76 /config.tests/x86_simd/x86_simd.pro | |
parent | ff1ffa7577ba88412daf9904bbc1e4de9e024436 (diff) |
Add a configure-time check for QT_COMPILER_SUPPORTS_SIMD_ALWAYS
This has two main benefits:
1) introduces a qmake CONFIG we can use in .pro/.pri/.prf files
2) removes the need to keep an up-to-date list of which compilers
support the feature
The test is implemented as trying to compile every single SIMD test we
currently have, but without passing the -mXXX option. The reason for
trying all of them is that some people may have modified their mkspecs
to add -mXXX options or -march=XXX, which could enable the particular
feature we tried, resulting in a false positive outcome.
Change-Id: I938b024e38bf4aac9154fffd14f7784dc8d1f020
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'config.tests/x86_simd/x86_simd.pro')
-rw-r--r-- | config.tests/x86_simd/x86_simd.pro | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/config.tests/x86_simd/x86_simd.pro b/config.tests/x86_simd/x86_simd.pro new file mode 100644 index 0000000000..52c24c24a8 --- /dev/null +++ b/config.tests/x86_simd/x86_simd.pro @@ -0,0 +1,5 @@ +SOURCES = main.cpp +for (config, SIMD) { + uc = $$upper($$config) + DEFINES += QT_COMPILER_SUPPORTS_$${uc} +} |