FindGSL

在版本 3.2 中新增。

尋找原生的 GNU 科學庫 (GSL) 包含檔和函式庫。

GNU 科學庫 (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 資料夾。如果有的話,名為 gsldgslblasdcblasd 的函式庫會被識別為除錯函式庫。對於類 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).