diff --git a/CMakeLists.txt b/CMakeLists.txt index 62160c6b5..337fd19a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,8 +182,8 @@ endif() ############################################################################### -# Find OpenMP -if(GTSAM_USE_EIGEN_MKL AND GTSAM_USE_EIGEN_MKL_OPENMP) +# Find OpenMP (if we're also using MKL) +if(GTSAM_USE_EIGEN_MKL AND GTSAM_USE_EIGEN_MKL_OPENMP AND GTSAM_USE_EIGEN_MKL) find_package(OpenMP) if(OPENMP_FOUND AND GTSAM_USE_EIGEN_MKL AND GTSAM_WITH_EIGEN_MKL_OPENMP)