Skip to content

Commit

Permalink
Update OpenCL-cpp to v2.0.16-61a5c9a-p0 (#536)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbsheth committed Jan 5, 2023
1 parent b6dde78 commit 0ace867
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmake/configs/default.cmake
Expand Up @@ -108,7 +108,7 @@ hunter_default_version(OpenAL VERSION 1.19.1)
hunter_default_version(OpenBLAS VERSION 0.3.21)
hunter_default_version(OpenCL VERSION 2022.01.04-p1)
hunter_default_version(OpenCL-Headers VERSION 2022.01.04)
hunter_default_version(OpenCL-cpp VERSION 2.0.10-p0)
hunter_default_version(OpenCL-cpp VERSION 2.0.16-61a5c9a-p0)
hunter_default_version(OpenCV VERSION 4.5.5-p0)
hunter_default_version(OpenCV-Extra VERSION 4.5.3)
hunter_default_version(OpenEXR VERSION 3.1.5-p0)
Expand Down
13 changes: 12 additions & 1 deletion cmake/projects/OpenCL-cpp/hunter.cmake
Expand Up @@ -8,6 +8,17 @@ include(hunter_download)
include(hunter_pick_scheme)

# List of versions here...
hunter_add_version(
PACKAGE_NAME
OpenCL-cpp
VERSION
"2.0.16-61a5c9a-p0"
URL
"https://github.com/cpp-pm/OpenCL-CLHPP/archive/refs/tags/v2.0.16-61a5c9a-p0.tar.gz"
SHA1
c1bf63fd603d8e581245b3e89fce47679f571c16
)

hunter_add_version(
PACKAGE_NAME
OpenCL-cpp
Expand All @@ -24,7 +35,7 @@ hunter_cmake_args(
CMAKE_ARGS
BUILD_DOCS=OFF
BUILD_EXAMPLES=OFF
BUILD_TESTS=OFF
BUILD_TESTING=OFF
)

# Pick a download scheme
Expand Down
7 changes: 5 additions & 2 deletions examples/OpenCL-cpp/CMakeLists.txt
Expand Up @@ -7,7 +7,10 @@ include("../common.cmake")
project(download_opencl_cpp)

hunter_add_package(OpenCL-cpp)
find_package(OpenCL-cpp CONFIG REQUIRED)
find_package(OpenCLHeadersCpp CONFIG REQUIRED)

hunter_add_package(OpenCL)
find_package(OpenCL CONFIG REQUIRED)

add_executable(opencl_cpp_test main.cpp)
target_link_libraries(opencl_cpp_test OpenCL-cpp::OpenCL-cpp)
target_link_libraries(opencl_cpp_test OpenCL::HeadersCpp OpenCL::OpenCL)
6 changes: 5 additions & 1 deletion examples/OpenCL-cpp/main.cpp
@@ -1,10 +1,14 @@
#define CL_HPP_MINIMUM_OPENCL_VERSION 120
#define CL_HPP_TARGET_OPENCL_VERSION 120
#define CL_TARGET_OPENCL_VERSION 120

#if __APPLE__
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif

#include <CL/cl.hpp>
#include <CL/opencl.hpp>

int main()
{
Expand Down

0 comments on commit 0ace867

Please sign in to comment.