Home

Awesome

OpenCL<sup>TM</sup> SDK (in development)

This is the Khronos OpenCL SDK. It brings together all the components needed to develop OpenCL applications:

It also contains resources useful to OpenCL developers:

Build Instructions

Dependencies

Example Build

The example build guide uses Vcpkg to fetch all dependencies. Note that Vcpkg is not a requirement and is only used for convenience. One may provide dependencies through any other CMake mechanism. For details on how to install Vcpkg, refer to its Getting Started Guide. The example build assumes targeting 64-bit Windows.

  1. Clone this repo with the rest of the OpenCL SDK components:

    git clone https://github.com/KhronosGroup/OpenCL-SDK.git
    git submodule init
    git submodule update
    
  2. Install dependencies:

    vcpkg --triplet x64-windows install sfml tclap glm
    
  3. Build and install SDK with samples and no downstream unit tests:

    cmake -A x64 `
          -D BUILD_TESTING=OFF `
          -D BUILD_DOCS=OFF `
          -D BUILD_EXAMPLES=OFF `
          -D BUILD_TESTS=OFF `
          -D OPENCL_SDK_BUILD_SAMPLES=ON `
          -D OPENCL_SDK_TEST_SAMPLES=OFF `
          -D CMAKE_TOOLCHAIN_FILE=/vcpkg/install/root/scripts/buildsystems/vcpkg.cmake `
          -D VCPKG_TARGET_TRIPLET=x64-windows `
          -B ./OpenCL-SDK/build -S ./OpenCL-SDK
    cmake --build ./OpenCL-SDK/build --target install
    

(Note: on Linux, paths to dependent libraries are automatically handled by RPATH in both the build and install tree. On Windows, all DLLs have to be on the PATH. Vcpkg copies dependent DLLs to the build tree, but in order to do the same in the install tree, a sufficiently new CMake version is required. CMake 3.21 introduces install(IMPORTED_RUNTIME_ARTIFACTS).)