summaryrefslogtreecommitdiffstats
path: root/Modules/FindBLAS.cmake
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2017-12-15 19:07:17 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2017-12-15 20:10:25 (GMT)
commitfcf32645946ae46219e91b9f6e87e42fb0574f9e (patch)
treed4c708b825000afad214bd56c1e93242ad0113ab /Modules/FindBLAS.cmake
parentf67f76c2b3a4c50d4116ce806df0c7f861e227dd (diff)
downloadCMake-fcf32645946ae46219e91b9f6e87e42fb0574f9e.zip
CMake-fcf32645946ae46219e91b9f6e87e42fb0574f9e.tar.gz
CMake-fcf32645946ae46219e91b9f6e87e42fb0574f9e.tar.bz2
FindBLAS: use FPHSA
Diffstat (limited to 'Modules/FindBLAS.cmake')
-rw-r--r--Modules/FindBLAS.cmake48
1 files changed, 6 insertions, 42 deletions
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index bb8b308..88dbea3 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -63,6 +63,7 @@
include(${CMAKE_CURRENT_LIST_DIR}/CheckFunctionExists.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/CheckFortranFunctionExists.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/CMakePushCheckState.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
cmake_push_check_state()
set(CMAKE_REQUIRED_QUIET ${BLAS_FIND_QUIETLY})
@@ -676,51 +677,14 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
endif ()
endif ()
-
if(BLA_F95)
- if(BLAS95_LIBRARIES)
- set(BLAS95_FOUND TRUE)
- else()
- set(BLAS95_FOUND FALSE)
- endif()
-
- if(NOT BLAS_FIND_QUIETLY)
- if(BLAS95_FOUND)
- message(STATUS "A library with BLAS95 API found.")
- else()
- if(BLAS_FIND_REQUIRED)
- message(FATAL_ERROR
- "A required library with BLAS95 API not found. Please specify library location.")
- else()
- message(STATUS
- "A library with BLAS95 API not found. Please specify library location.")
- endif()
- endif()
+ find_package_handle_standard_args(BLAS REQUIRED_VARS BLAS95_LIBRARIES)
+ set(BLAS95_FOUND ${BLAS_FOUND})
+ if(BLAS_FOUND)
+ set(BLAS_LIBRARIES "${BLAS95_LIBRARIES}")
endif()
- set(BLAS_FOUND TRUE)
- set(BLAS_LIBRARIES "${BLAS95_LIBRARIES}")
else()
- if(BLAS_LIBRARIES)
- set(BLAS_FOUND TRUE)
- else()
- set(BLAS_FOUND FALSE)
- endif()
-
- if(NOT BLAS_FIND_QUIETLY)
- if(BLAS_FOUND)
- message(STATUS "A library with BLAS API found.")
- else()
- if(BLAS_FIND_REQUIRED)
- message(FATAL_ERROR
- "A required library with BLAS API not found. Please specify library location."
- )
- else()
- message(STATUS
- "A library with BLAS API not found. Please specify library location."
- )
- endif()
- endif()
- endif()
+ find_package_handle_standard_args(BLAS REQUIRED_VARS BLAS_LIBRARIES)
endif()
cmake_pop_check_state()