aboutsummaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Zvi Rackover <zvirack@gmail.com>2017-11-16 19:53:38 +0000
committerGravatar Zvi Rackover <zvirack@gmail.com>2017-11-16 19:53:38 +0000
commit599a88da273ecaf00fec7cf9263a574ed44fef4f (patch)
treedbd011ca3cfae9a513cb89a9f3d0371315f8847d /CMakeLists.txt
parent672bdc126b0923e6228a024ce62d1f18b05840ea (diff)
Disable gcc-specific workaround for Clang to allow build with AVX512
There is currently a workaround for an issue in gcc that requires invoking gcc with the -fabi-version flag. This workaround is not needed for Clang and moreover is not supported.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 62bf823c8..8a068739b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -232,7 +232,10 @@ if(NOT MSVC)
option(EIGEN_TEST_AVX512 "Enable/Disable AVX512 in tests/examples" OFF)
if(EIGEN_TEST_AVX512)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx512f -fabi-version=6 -DEIGEN_ENABLE_AVX512")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx512f -DEIGEN_ENABLE_AVX512")
+ if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fabi-version=6")
+ endif()
message(STATUS "Enabling AVX512 in tests/examples")
endif()