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}")