adding lapacke.cmake stub

This commit is contained in:
Radovan Bast
2015-09-17 10:44:30 +02:00
parent e399058e37
commit 6efc29457d
5 changed files with 49 additions and 32 deletions

41
modules/lapacke.cmake Normal file
View File

@ -0,0 +1,41 @@
#.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.cfg configuration::
#
# docopt: --lapacke Find and link to LAPACKE [default: False].
# define: '-DENABLE_LAPACKE=%s' % arguments['--lapacke']
# fetch: https://github.com/scisoft/autocmake/raw/master/modules/find/find_libraries.cmake
# https://github.com/scisoft/autocmake/raw/master/modules/find/find_include_files.cmake
option(ENABLE_LAPACKE "Find and link to LAPACKE" OFF)
if(ENABLE_LAPACKE)
include(find_libraries)
include(find_include_files)
set(LAPACKE_FOUND FALSE)
set(LAPACKE_LIBRARIES "undefined")
set(LAPACKE_INCLUDE_DIR "undefined")
# if(APPLE)
# _find_library(Accelerate cblas_dgemm LAPACKE_LIBRARIES)
# _find_include_dir(Accelerate.h /usr LAPACKE_INCLUDE_DIR)
# else()
_find_library(lapacke LAPACKE_dgesv LAPACKE_LIBRARIES)
_find_include_dir(lapacke.h /usr LAPACKE_INCLUDE_DIR)
# endif()
if(NOT "${LAPACKE_LIBRARIES}" STREQUAL "undefined")
if(NOT "${LAPACKE_INCLUDE_DIR}" STREQUAL "undefined")
set(LAPACKE_FOUND TRUE)
endif()
endif()
endif()