forked from jedbrown/cmake-modules
-
Notifications
You must be signed in to change notification settings - Fork 1
/
FindGSL.cmake
32 lines (24 loc) · 1.06 KB
/
FindGSL.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
# - Find GSL
# Find the native GSL includes and library
#
# GSL_INCLUDES - where to find gsl/gsl_*.h, etc.
# GSL_LIBRARIES - List of libraries when using GSL.
# GSL_FOUND - True if GSL found.
if (GSL_INCLUDES)
# Already in cache, be silent
set (GSL_FIND_QUIETLY TRUE)
endif (GSL_INCLUDES)
find_path (GSL_INCLUDES gsl/gsl_math.h)
find_library (GSL_LIB NAMES gsl)
set (GSL_CBLAS_LIB "" CACHE FILEPATH "If your program fails to link
(usually because GSL is not automatically linking a CBLAS and no other
component of your project provides a CBLAS) then you may need to point
this variable to a valid CBLAS. Usually GSL is distributed with
libgslcblas.{a,so} (next to GSL_LIB) which you may use if an optimized
CBLAS is unavailable.")
set (GSL_LIBRARIES "${GSL_LIB}" "${GSL_CBLAS_LIB}")
# handle the QUIETLY and REQUIRED arguments and set GSL_FOUND to TRUE if
# all listed variables are TRUE
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (GSL DEFAULT_MSG GSL_LIBRARIES GSL_INCLUDES)
mark_as_advanced (GSL_LIB GSL_CBLAS_LIB GSL_INCLUDES)