Handling OpenCL with CMake 3.1 and higher
There has been quite some “find OpenCL” code for CMake around. If you haven’t heard of CMake, it’s the most useful cross-platform tool to make cross-platform software. Put this into CMakeLists.txt, changing the names for the executable. #Minimal OpenCL CMakeLists.txt by StreamHPC cmake_minimum_required (VERSION 3.1) project(GreatProject) # Handle OpenCL find_package(OpenCL REQUIRED) include_directories(${OpenCL_INCLUDE_DIRS}) link_directories(${OpenCL_LIBRARY}) add_executable (main main.cpp)
Handling OpenCL with CMake 3.1 and higher Read More »









