尋找GSL

在版本 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).