Added an option to enable the use of the F16C instruction set

This commit is contained in:
Benoit Steiner 2016-04-21 10:30:29 -07:00
parent 32ffce04fc
commit 6015422ee6

View File

@ -221,6 +221,12 @@ if(NOT MSVC)
message(STATUS "Enabling FMA in tests/examples") message(STATUS "Enabling FMA in tests/examples")
endif() endif()
option(EIGEN_TEST_F16C "Enable/Disable F16C in tests/examples" OFF)
if(EIGEN_TEST_F16C)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mf16c")
message(STATUS "Enabling F16C in tests/examples")
endif()
option(EIGEN_TEST_ALTIVEC "Enable/Disable AltiVec in tests/examples" OFF) option(EIGEN_TEST_ALTIVEC "Enable/Disable AltiVec in tests/examples" OFF)
if(EIGEN_TEST_ALTIVEC) if(EIGEN_TEST_ALTIVEC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maltivec -mabi=altivec") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maltivec -mabi=altivec")