From 8ddf01ff80d9f9fb87465b75c1bfe083bf4e1849 Mon Sep 17 00:00:00 2001
From: Florent Pruvost <florent.pruvost@inria.fr>
Date: Mon, 14 May 2018 14:38:54 +0200
Subject: [PATCH] openmp is required only if we look explicitly for
 multithreaded mkl

---
 modules/find/FindBLAS.cmake | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/modules/find/FindBLAS.cmake b/modules/find/FindBLAS.cmake
index aba7aed..7ec890b 100644
--- a/modules/find/FindBLAS.cmake
+++ b/modules/find/FindBLAS.cmake
@@ -537,15 +537,13 @@ if( (NOT BLAS_FOUND_WITH_PKGCONFIG) OR BLAS_GIVEN_BY_USER )
           endif()
         endif()
         set(BLAS_CFLAGS_OTHER "")
-        if (NOT BLA_VENDOR STREQUAL "Intel10_64lp_seq")
-          if(BLAS_FIND_REQUIRED)
-            find_package(OpenMP REQUIRED)
-          else()
-            find_package(OpenMP)
-          endif()
-          if(OPENMP_C_FLAGS)
-            list(APPEND BLAS_CFLAGS_OTHER "${OPENMP_C_FLAGS}")
-          endif()
+        if (BLA_VENDOR STREQUAL "Intel10_64lp" AND BLAS_FIND_REQUIRED)
+          find_package(OpenMP REQUIRED)
+        else()
+          find_package(OpenMP)
+        endif()
+        if(OPENMP_C_FLAGS)
+          list(APPEND BLAS_CFLAGS_OTHER "${OPENMP_C_FLAGS}")
         endif()
         if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
           if (BLA_VENDOR STREQUAL "Intel10_32")
-- 
GitLab