diff options
author | David Kalnischkies <david@kalnischkies.de> | 2020-05-21 22:17:42 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2020-05-25 12:05:00 +0200 |
commit | 574249cd721a3cdbb79b6e457384a55827856b6a (patch) | |
tree | b6c98b9f776aee10b019b3b2211e9c1625ec6025 /CMakeLists.txt | |
parent | c3bfdbfa3ae868515a67142d2df6200a3cb34d35 (diff) |
Allow FMV SSE4.2 detection to succeed on clang
As the builtins were used in the feature test also in the default branch
clang fails to compile the test helpfully complaining that you need to
compile with sse4.2 to use that while on gcc it is optimized out as
unused code and produces only a warning for that… removing the code from
the default branch fixes this problem, but we adapt the code some more to
avoid compilers optimizing it out in the future just in case.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9df96ee85..115041f54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -198,8 +198,8 @@ endif() # Check multiversioning include(CheckCxxTarget) -check_cxx_target(HAVE_FMV_SSE42_AND_CRC32 "sse4.2" "__builtin_ia32_crc32si(0, 1llu);") -check_cxx_target(HAVE_FMV_SSE42_AND_CRC32DI "sse4.2" "__builtin_ia32_crc32di(0, 1llu);") +check_cxx_target(HAVE_FMV_SSE42_AND_CRC32 "sse4.2" "__builtin_ia32_crc32si(0,i)|__builtin_ia32_crc32hi(0,i)|__builtin_ia32_crc32qi(0,i)") +check_cxx_target(HAVE_FMV_SSE42_AND_CRC32DI "sse4.2" "__builtin_ia32_crc32di(0,i)") # Configure some variables like package, version and architecture. set(PACKAGE ${PROJECT_NAME}) |