Overview

FindOpenCL.cmake

Author: Sergiu Dotenco
Date: September 16, 2011

Overview

This module allows to locate OpenCL and to determine its version while configuring the project.

Customizable variables

OPENCL_ROOT_DIR
Specifies OpenCL's root directory. The find module uses this variable to locate OpenCL. The variable will be filled automatically unless explicitly set using CMake's -D command-line option. Instead of setting a CMake variable, an environment variable called OCLROOT can be used. While locating the root directory, the module will try to detect OpenCL implementations provided by AMD's Accelerated Parallel Processing SDK, NVIDIA's GPU Computing Toolkit and Intel's OpenCL SDK by examining the AMDAPPSDKROOT, CUDA_PATH and INTELOCLSDKROOT environment variables, respectively.

Read-only variables

OPENCL_FOUND
Indicates whether the library has been found.
OPENCL_INCLUDE_DIRS
Specifies the OpenCL include directories.
OPENCL_LIBRARIES
Specifies the OpenCL libraries that should be passed to target_link_libararies.