From dd961f8c60ed684b7e3683b348544fc28f391d8f Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Fri, 5 Mar 2010 10:22:27 +0100 Subject: [PATCH] add an option to test ompenmp --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) 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)