diff options
author | Gael Guennebaud <g.gael@free.fr> | 2010-03-05 10:22:27 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2010-03-05 10:22:27 +0100 |
commit | dd961f8c60ed684b7e3683b348544fc28f391d8f (patch) | |
tree | 40f03fe5e90964a8c9986f2ccc0f5c6eda726deb /CMakeLists.txt | |
parent | 62ac0216060045619ff1e6035643ecf9dbefa14f (diff) |
add an option to test ompenmp
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4016de370..4e9c4533d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -110,6 +110,15 @@ if(CMAKE_COMPILER_IS_GNUCXX) message("Enabling NEON in tests/examples") endif() + check_cxx_compiler_flag("-fopenmp" COMPILER_SUPPORT_OPENMP) + if(COMPILER_SUPPORT_OPENMP) + option(EIGEN_TEST_OPENMP "Enable/Disable OpenMP in tests/examples" OFF) + if(EIGEN_TEST_OPENMP) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp") + message("Enabling OpenMP in tests/examples") + endif() + endif() + endif(CMAKE_COMPILER_IS_GNUCXX) if(MSVC) |