ocl: dynamic load of OpenCL libraries
Support functions from OpenCL 1.1 / OpenCL 1.2
This commit is contained in:
14
cmake/checks/opencl11.cpp
Normal file
14
cmake/checks/opencl11.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#if defined __APPLE__
|
||||
#include <OpenCL/cl.h>
|
||||
#else
|
||||
#include <CL/cl.h>
|
||||
#endif
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
#ifdef CL_VERSION_1_1
|
||||
#else
|
||||
#error OpenCL 1.1 not found
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
14
cmake/checks/opencl12.cpp
Normal file
14
cmake/checks/opencl12.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#if defined __APPLE__
|
||||
#include <OpenCL/cl.h>
|
||||
#else
|
||||
#include <CL/cl.h>
|
||||
#endif
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
#ifdef CL_VERSION_1_2
|
||||
#else
|
||||
#error OpenCL 1.2 not found
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user