OpenCL-Headers icon indicating copy to clipboard operation
OpenCL-Headers copied to clipboard

Added this repo as a submodule

Open FTamas77 opened this issue 3 years ago • 2 comments

I'm totaly new here. I coud add this repo into my repo as a submodule. I also could build on Linux and Windows.

I've two thing I don't know and I don't find the right answer.

1.) In the past OpenCL 1.2 was only a header file. What is this package?

cmake path/to/opencl/app -DOpenCLHeaders_ROOT=/chosen/install/prefix

I added it in the main file and fails? Where should is put this? When the package is created? What kindof package?

Why a package helps me? I want to use for many things OpenCL?

2.) The package doesn't find:

cmake_minimum_required(VERSION 3.0) cmake_policy(VERSION 3.0...3.18.4) project(proj) add_executable(app main.cpp) find_package(OpenCLHeaders REQUIRED) target_link_libraries(app PRIVATE OpenCL::Headers)

Is this repo create a package for easy usage and I just to add it to the target? I'm big fun of OpenCL and I want to understand it. :-)

Could you be so kind give an example?

Thanks,

FTamas77 avatar Dec 30 '21 19:12 FTamas77

I've one problem: I've already use conan and I don't know how to add it. Furthermore I have to do it both on Linux and Windows. How can I pass to conaninfo file to my app?

FTamas77 avatar Dec 31 '21 15:12 FTamas77

Hello!

Here are two repos that use the OpenCL headers. Both currently use the OpenCL headers without needing the CMake package, though the "OpenCL SDK" will be upgraded shortly:

  • https://github.com/KhronosGroup/OpenCL-SDK
  • https://github.com/bashbaug/SimpleOpenCLSamples

In short, you don't need to use the CMake package, though building and using the CMake package can arguably simplify some dependencies.

I don't use conan, but if you'd be interested in adding conan support for an OpenCL headers package we'd be happy to work with you to add support. Glad to hear you're an OpenCL fan!

bashbaug avatar Jan 04 '22 05:01 bashbaug