1 diff --git a/CMakeLists.txt b/CMakeLists.txt
2 index 86fec9e..b9d0341 100644
5 @@ -22,7 +22,7 @@ elseif(WIN32 AND ${OpenCL_LIBRARIES} MATCHES "OpenCL.lib")
6 set(OpenCL_LIBRARIES ${OpenCL_LIBRARIES} cfgmgr32.lib)
9 -FIND_PATH(HPP_FOUND CL/cl.hpp PATHS ${OpenCL_INCLUDE_DIRS})
10 +FIND_PATH(HPP_FOUND CL/cl2.hpp PATHS ${OpenCL_INCLUDE_DIRS})
12 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
14 diff --git a/include/clpeak.h b/include/clpeak.h
15 index c090d31..0d9d5e2 100644
16 --- a/include/clpeak.h
17 +++ b/include/clpeak.h
22 -#define __CL_ENABLE_EXCEPTIONS
34 diff --git a/include/common.h b/include/common.h
35 index 91318cb..6aaca04 100644
36 --- a/include/common.h
37 +++ b/include/common.h
43 +#define CL_HPP_ENABLE_EXCEPTIONS
44 +#define CL_HPP_MINIMUM_OPENCL_VERSION 120
45 +#define CL_HPP_TARGET_OPENCL_VERSION 120
46 +#include <CL/cl2.hpp>
48 #if defined(__APPLE__) || defined(__MACOSX) || defined(__FreeBSD__)
49 #include <sys/types.h>
51 diff --git a/src/clpeak.cpp b/src/clpeak.cpp
52 index 8708463..4a47842 100644
57 #define MSTRINGIFY(...) #__VA_ARGS__
59 -static const char *stringifiedKernels =
60 +static const std::string stringifiedKernels =
61 #include "global_bandwidth_kernels.cl"
62 #include "compute_sp_kernels.cl"
63 #include "compute_hp_kernels.cl"
64 @@ -65,7 +65,7 @@ int clPeak::runAll()
66 cl::Context ctx(CL_DEVICE_TYPE_ALL, cps);
67 vector<cl::Device> devices = ctx.getInfo<CL_CONTEXT_DEVICES>();
68 - cl::Program::Sources source(1, make_pair(stringifiedKernels, (strlen(stringifiedKernels) + 1)));
69 + cl::Program::Sources source(1, stringifiedKernels);
70 cl::Program prog = cl::Program(ctx, source);
72 for (size_t d = 0; d < devices.size(); d++)