qt5base-lts/config.tests/x86intrin/CMakeLists.txt
Thiago Macieira db342f42a4 CMake: update the x86 intrinsic checks
Merge all the existing checks into a single one, which is a simple pass
or fail, since all our supported compilers support all the intrinsics up
to Cannon Lake. The two I've recently added (AVX512VBMI2 and VAES)
aren't yet supported everywhere, so they stay.

For some reason, all intrinsics seem to be disabled on Android. It looks
like some support was missing during the CMake port and this was never
again looked at. I'm leaving it be.

As for WASM, discussion with maintainers is that the WASM emulation of
x86 intrinsics is too hit-and-miss. No one is testing the performance,
particularly the person writing such code (me). They also have some
non-obvious selection of what is supported natively and what is
merely emulated. Using the actual WASM intrinsics is preferred, but
someone else's job.

Change-Id: Ib42b3adc93bf4d43bd55fffd16c10d66208e8384
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-06-28 03:28:42 +00:00

10 lines
400 B
CMake

cmake_minimum_required(VERSION 3.16)
project(x86intrin LANGUAGES CXX)
add_executable(x86intrin main.cpp)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU|IntelLLVM|QCC")
target_compile_options(x86intrin PUBLIC
"-march=cannonlake" "-mrdrnd" "-mrdseed" "-maes" "-msha" "-w")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_options(x86intrin PUBLIC "-arch:AVX512" "-W0")
endif()