FindOpenCL

新增於版本 3.1。

尋找開放運算語言 (OpenCL)

新增於版本 3.10:偵測 OpenCL 2.1 和 2.2。

匯入目標

新增於版本 3.7。

此模組定義了 IMPORTED 目標 OpenCL::OpenCL,如果已找到 OpenCL。

結果變數

此模組定義了以下變數

OpenCL_FOUND          - True if OpenCL was found
OpenCL_INCLUDE_DIRS   - include directories for OpenCL
OpenCL_LIBRARIES      - link against this library to use OpenCL
OpenCL_VERSION_STRING - Highest supported OpenCL version (eg. 1.2)
OpenCL_VERSION_MAJOR  - The major version of the OpenCL implementation
OpenCL_VERSION_MINOR  - The minor version of the OpenCL implementation

此模組也將定義兩個快取變數

OpenCL_INCLUDE_DIR    - the OpenCL include directory
OpenCL_LIBRARY        - the path to the OpenCL library