-
Notifications
You must be signed in to change notification settings - Fork 18
/
lapacke.cmake
41 lines (35 loc) · 1.29 KB
/
lapacke.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# (c) https://github.com/dev-cafe/autocmake/blob/master/AUTHORS.md
# licensed under BSD-3: https://github.com/dev-cafe/autocmake/blob/master/LICENSE
#.rst:
#
# Find and link to LAPACKE.
#
# Variables defined::
#
# LAPACKE_FOUND - describe me, uncached
# LAPACKE_LIBRARIES - describe me, uncached
# LAPACKE_INCLUDE_DIR - describe me, uncached
#
# autocmake.yml configuration::
#
# url_root: https://github.com/dev-cafe/autocmake/raw/master/
# docopt: "--lapacke Find and link to LAPACKE [default: False]."
# define: "'-DENABLE_LAPACKE={0}'.format(arguments['--lapacke'])"
# fetch:
# - "%(url_root)modules/find/find_libraries.cmake"
# - "%(url_root)modules/find/find_include_files.cmake"
option(ENABLE_LAPACKE "Find and link to LAPACKE" OFF)
if(ENABLE_LAPACKE)
include(${CMAKE_CURRENT_LIST_DIR}/find_libraries.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/find_include_files.cmake)
set(LAPACKE_FOUND FALSE)
set(LAPACKE_LIBRARIES "NOTFOUND")
set(LAPACKE_INCLUDE_DIR "NOTFOUND")
_find_library(lapacke LAPACKE_dgesv LAPACKE_LIBRARIES)
_find_include_dir(lapacke.h /usr LAPACKE_INCLUDE_DIR)
if(NOT "${LAPACKE_LIBRARIES}" MATCHES "NOTFOUND")
if(NOT "${LAPACKE_INCLUDE_DIR}" MATCHES "NOTFOUND")
set(LAPACKE_FOUND TRUE)
endif()
endif()
endif()