aboutsummaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-10-13 09:04:59 -0400
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-10-13 09:04:59 -0400
commitc8ecc897c06a6fa472175c7e23b463b9c407c0be (patch)
tree51cdd9589903fc0e1cfbdaecae815b58be488855 /CMakeLists.txt
parent3a2bb7f78256df94f4b53e87f1b9d203965b1e4d (diff)
add EIGEN_TEST_X87 option
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ab006d20f..d5d855183 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -198,6 +198,18 @@ if(MSVC)
endif(MSVC)
option(EIGEN_TEST_NO_EXPLICIT_VECTORIZATION "Disable explicit vectorization in tests/examples" OFF)
+option(EIGEN_TEST_X87 "Force using X87 instructions. Implies no vectorization." OFF)
+
+if(EIGEN_TEST_X87)
+ set(EIGEN_TEST_NO_EXPLICIT_VECTORIZATION ON)
+ if(CMAKE_COMPILER_IS_GNUCXX)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpmath=387")
+ message("Forcing use of x87 instructions in tests/examples")
+ else()
+ message("EIGEN_TEST_X87 ignored on your compiler")
+ endif()
+endif()
+
if(EIGEN_TEST_NO_EXPLICIT_VECTORIZATION)
add_definitions(-DEIGEN_DONT_VECTORIZE=1)
message("Disabling vectorization in tests/examples")