查找GSL

在 3.2 版本加入.

查找本地 GNU 科学图书馆 (GSL) 包含和库。

GNU Scientific Library (GSL) 是一个面向 C 和 C++ 程序员的数值库。它是 GNU 通用公共许可证下的免费软件。

进口目标

如果找到 GSL,则此模块定义以下 IMPORTED 目标

GSL::gsl      - The main GSL library.
GSL::gslcblas - The CBLAS support library used by GSL.

结果变量

该模块将在您的项目中设置以下变量

GSL_FOUND          - True if GSL found on the local system
GSL_INCLUDE_DIRS   - Location of GSL header files.
GSL_LIBRARIES      - The GSL libraries.
GSL_VERSION        - The version of the discovered GSL install.

提示

将“GSL_ROOT_DIR”设置为包含 GSL 安装的目录。

该脚本期望在“$GSL_ROOT_DIR/lib”中找到库,在“$GSL_ROOT_DIR/include/gsl”中找到 GSL 标头。库目录可以选择提供 Release 和 Debug 文件夹。如果可用,名为“gsld”、“gslblasd”或“cblasd”的库将被识别为调试库。对于类 Unix 系统,此脚本将使用“$GSL_ROOT_DIR/bin/gsl-config”(如果找到)来帮助发现 GSL。

缓存变量

该模块可能会根据平台和发现的 GSL 安装类型设置以下变量。可以选择设置这些变量以帮助此模块找到正确的文件

GSL_CBLAS_LIBRARY       - Location of the GSL CBLAS library.
GSL_CBLAS_LIBRARY_DEBUG - Location of the debug GSL CBLAS library (if any).
GSL_CONFIG_EXECUTABLE   - Location of the ``gsl-config`` script (if any).
GSL_LIBRARY             - Location of the GSL library.
GSL_LIBRARY_DEBUG       - Location of the debug GSL library (if any).