diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a8a25fe6..e1a9bc8b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,7 +97,10 @@ if(USE_SIMD_UTILS) endif() if(MSVC) add_compile_options(/flax-vector-conversions) - else(MSVC) + elseif(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang") + # clang has a different default behaviour than gcc or msvc for lax-vector-conversions + # and does not need the flag - it causes actually harm for some type casts - + # see https://github.com/DLTcollab/sse2neon/pull/614 add_compile_options(-flax-vector-conversions) endif(MSVC) endif(USE_SIMD_UTILS)