summaryrefslogtreecommitdiffstats
path: root/Modules/FindBLAS.cmake
diff options
context:
space:
mode:
authorJakub Benda <jacob.benda@gmail.com>2018-11-18 21:37:14 (GMT)
committerJakub Benda <jacob.benda@gmail.com>2018-11-24 12:14:32 (GMT)
commitc259912b14fc63db0441c30c33b79ebbef058e06 (patch)
tree8312111ba45f921381168a975010a4f18b4fd3c2 /Modules/FindBLAS.cmake
parentd5f691be0b78a48e836dc42b97d000ba151c44d6 (diff)
downloadCMake-c259912b14fc63db0441c30c33b79ebbef058e06.zip
CMake-c259912b14fc63db0441c30c33b79ebbef058e06.tar.gz
CMake-c259912b14fc63db0441c30c33b79ebbef058e06.tar.bz2
FindBLAS: Do not look for BLAS once BLAS95 has been found
When BLA_F95 is ON, FindBLAS looks for BLAS95_LIBRARIES (in Intel MKL). As this is a superset of BLAS_LIBRARIES, if they are found, no further search in other vendors is necessary.
Diffstat (limited to 'Modules/FindBLAS.cmake')
-rw-r--r--Modules/FindBLAS.cmake16
1 files changed, 9 insertions, 7 deletions
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index c286a4d..cd6ed8f 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -405,6 +405,14 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
endif ()
endif ()
+if(BLA_F95)
+ find_package_handle_standard_args(BLAS REQUIRED_VARS BLAS95_LIBRARIES)
+ set(BLAS95_FOUND ${BLAS_FOUND})
+ if(BLAS_FOUND)
+ set(BLAS_LIBRARIES "${BLAS95_LIBRARIES}")
+ endif()
+endif()
+
if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
if(NOT BLAS_LIBRARIES)
# gotoblas (http://www.tacc.utexas.edu/tacc-projects/gotoblas2)
@@ -740,13 +748,7 @@ if (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All")
endif()
endif ()
-if(BLA_F95)
- find_package_handle_standard_args(BLAS REQUIRED_VARS BLAS95_LIBRARIES)
- set(BLAS95_FOUND ${BLAS_FOUND})
- if(BLAS_FOUND)
- set(BLAS_LIBRARIES "${BLAS95_LIBRARIES}")
- endif()
-else()
+if(NOT BLA_F95)
find_package_handle_standard_args(BLAS REQUIRED_VARS BLAS_LIBRARIES)
endif()