#
# This module exports
#
+# GSL_FOUND
# GSL_LIBRARIES
# GSL_INCLUDE_DIRS
# GSL_LINKER_FLAGS
#
+#
+# OK... It could be all so easy by just calling FindGSL.cmake (shipped with
+# CMake around 3.2 onwards). Unfortunately this module sets up imported
+# targets for the library it found (a feature). Unfortunately, portions of
+# the target information seem to be cached and are thus incompatible with
+# our notion of disabling and clearing a feature *sigh*.
+#
+# Further we support CMake from version 2.8.8 onwards and would have to do
+# the manual work anyway.
+#
+
SET(GSL_DIR "" CACHE PATH "An optional hint to a GSL installation")
SET_IF_EMPTY(GSL_DIR "$ENV{GSL_DIR}")
PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
)
+#
+# Also pick up the cblas implementation. If libgslcblas.so (or similar) is
+# found we assume that gsl has to be linked against this library,
+# alternatively as a fall back try known system cblas names
+#
+DEAL_II_FIND_LIBRARY(GSL_CBLAS_LIBRARY
+ NAMES gslcblas cblas refcblas
+ HINTS ${GSL_DIR}
+ PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
+ )
+
DEAL_II_FIND_PATH(GSL_INCLUDE_DIR gsl/gsl_version.h
HINTS ${GSL_DIR}
PATH_SUFFIXES include
DEAL_II_PACKAGE_HANDLE(GSL
LIBRARIES
REQUIRED GSL_LIBRARY
+ OPTIONAL GSL_CBLAS_LIBRARY
INCLUDE_DIRS
REQUIRED GSL_INCLUDE_DIR
USER_INCLUDE_DIRS
REQUIRED GSL_INCLUDE_DIR
- CLEAR GSL_LIBRARY GSL_INCLUDE_DIR
+ CLEAR GSL_LIBRARY GSL_CBLAS_LIBRARY GSL_INCLUDE_DIR
)