FindOpenCL

From Get docs
Cmake/docs/3.21/module/findopencl


FindOpenCL

New in version 3.1.


Finds Open Computing Language (OpenCL)

New in version 3.10: Detection of OpenCL 2.1 and 2.2.


IMPORTED Targets

New in version 3.7.


This module defines IMPORTED target OpenCL::OpenCL, if OpenCL has been found.

Result Variables

This module defines the following variables:

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

The module will also define two cache variables:

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

© 2000–2021 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/v3.21/module/FindOpenCL.html