aboutsummaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2011-02-27 17:27:23 -0500
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2011-02-27 17:27:23 -0500
commitb6299c974f94ca48e8c43fad18e588e55108a458 (patch)
treeb9e56a6ce744e1cbe2542c1ca6a4a093308bec84 /CMakeLists.txt
parentb3544ce2ae329b76d886bf4ed6c74ead32b6c662 (diff)
add option to build in 32bit mode
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e13ef9179..db571727e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -207,6 +207,7 @@ 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)
+option(EIGEN_TEST_32BIT "Force generating 32bit code." OFF)
if(EIGEN_TEST_X87)
set(EIGEN_TEST_NO_EXPLICIT_VECTORIZATION ON)
@@ -218,6 +219,15 @@ if(EIGEN_TEST_X87)
endif()
endif()
+if(EIGEN_TEST_32BIT)
+ if(CMAKE_COMPILER_IS_GNUCXX)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
+ message(STATUS "Forcing generation of 32-bit code in tests/examples")
+ else()
+ message(STATUS "EIGEN_TEST_32BIT ignored on your compiler")
+ endif()
+endif()
+
if(EIGEN_TEST_NO_EXPLICIT_VECTORIZATION)
add_definitions(-DEIGEN_DONT_VECTORIZE=1)
message(STATUS "Disabling vectorization in tests/examples")