From 9bb6beed924e8fba9cbc09cc6e15fc8afa8eb7f3 Mon Sep 17 00:00:00 2001 From: cbeall3 Date: Tue, 30 Sep 2014 16:13:15 -0400 Subject: [PATCH] Fix OpenMP configuration when MKL is enabled --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ef48a56e..6fcce54b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -174,9 +174,9 @@ endif() ############################################################################### # Find OpenMP (if we're also using MKL) -if(GTSAM_WITH_EIGEN_MKL AND GTSAM_USE_EIGEN_MKL_OPENMP AND GTSAM_USE_EIGEN_MKL) - find_package(OpenMP) +find_package(OpenMP) # do this here to generate correct message if disabled +if(GTSAM_WITH_EIGEN_MKL AND GTSAM_WITH_EIGEN_MKL_OPENMP AND GTSAM_USE_EIGEN_MKL) if(OPENMP_FOUND AND GTSAM_USE_EIGEN_MKL AND GTSAM_WITH_EIGEN_MKL_OPENMP) set(GTSAM_USE_EIGEN_MKL_OPENMP 1) # This will go into config.h set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")