diff options
author | Wade Walker <[email protected]> | 2015-11-01 14:13:37 -0600 |
---|---|---|
committer | Wade Walker <[email protected]> | 2015-11-08 14:05:35 -0600 |
commit | ad95421312871694ec8009d9f92089c79b9f8607 (patch) | |
tree | 93a26b70dec0b2fe4489acebad4117ea80bf6279 | |
parent | 215901444d8fd98a14f190e6aa10c17b84ee4b7d (diff) |
Fix compilation of OpenCL 2.x headers on OS X
The include files were getting the OS X framework files from OpenCL/*.h,
instead of the local stub files from CL/*.h, which meant that OpenCL
2.x-related things were undefined. Changed OpenCL 2.x stub files to
refer to local .h files only. Maybe later change 1.x also, but leaving
it for now to minimize disruption to working code.
-rw-r--r-- | make/stub_includes/CL11/cl.h | 1 | ||||
-rw-r--r-- | make/stub_includes/CL12/cl.h | 1 | ||||
-rw-r--r-- | make/stub_includes/CL20/cl.h | 3 | ||||
-rw-r--r-- | make/stub_includes/CL20/cl_ext.h | 2 | ||||
-rw-r--r-- | make/stub_includes/CL20/cl_gl.h | 2 | ||||
-rw-r--r-- | make/stub_includes/CL20/cl_gl_ext.h | 2 | ||||
-rw-r--r-- | make/stub_includes/CL20/cl_platform.h | 5 | ||||
-rw-r--r-- | make/stub_includes/CL20/opencl.h | 8 |
8 files changed, 16 insertions, 8 deletions
diff --git a/make/stub_includes/CL11/cl.h b/make/stub_includes/CL11/cl.h index 4355e74..51f86cd 100644 --- a/make/stub_includes/CL11/cl.h +++ b/make/stub_includes/CL11/cl.h @@ -27,6 +27,7 @@ #define __OPENCL_CL_H #ifdef __APPLE__ +#pragma GCC diagnostic ignored "-Wignored-attributes" #include <OpenCL/cl_platform.h> #else #include <CL/cl_platform.h> diff --git a/make/stub_includes/CL12/cl.h b/make/stub_includes/CL12/cl.h index c2969b2..6ac4a5c 100644 --- a/make/stub_includes/CL12/cl.h +++ b/make/stub_includes/CL12/cl.h @@ -25,6 +25,7 @@ #define __OPENCL_CL_H #ifdef __APPLE__ +#pragma GCC diagnostic ignored "-Wignored-attributes" #include <OpenCL/cl_platform.h> #else #include <CL/cl_platform.h> diff --git a/make/stub_includes/CL20/cl.h b/make/stub_includes/CL20/cl.h index 0105e57..caea06b 100644 --- a/make/stub_includes/CL20/cl.h +++ b/make/stub_includes/CL20/cl.h @@ -25,7 +25,8 @@ #define __OPENCL_CL_H #ifdef __APPLE__ -#include <OpenCL/cl_platform.h> +#pragma GCC diagnostic ignored "-Wignored-attributes" +#include <CL/cl_platform.h> #else #include <CL/cl_platform.h> #endif diff --git a/make/stub_includes/CL20/cl_ext.h b/make/stub_includes/CL20/cl_ext.h index cc15d85..5fb7349 100644 --- a/make/stub_includes/CL20/cl_ext.h +++ b/make/stub_includes/CL20/cl_ext.h @@ -34,7 +34,7 @@ extern "C" { #endif #ifdef __APPLE__ - #include <OpenCL/cl.h> + #include <CL/cl.h> #include <AvailabilityMacros.h> #else #include <CL/cl.h> diff --git a/make/stub_includes/CL20/cl_gl.h b/make/stub_includes/CL20/cl_gl.h index 0408093..4ab6fb9 100644 --- a/make/stub_includes/CL20/cl_gl.h +++ b/make/stub_includes/CL20/cl_gl.h @@ -25,7 +25,7 @@ #define __OPENCL_CL_GL_H #ifdef __APPLE__ -#include <OpenCL/cl.h> +#include <CL/cl.h> #else #include <CL/cl.h> #endif diff --git a/make/stub_includes/CL20/cl_gl_ext.h b/make/stub_includes/CL20/cl_gl_ext.h index a46e0a2..cac8a76 100644 --- a/make/stub_includes/CL20/cl_gl_ext.h +++ b/make/stub_includes/CL20/cl_gl_ext.h @@ -34,7 +34,7 @@ extern "C" { #endif #ifdef __APPLE__ - #include <OpenCL/cl_gl.h> + #include <CL/cl_gl.h> #else #include <CL/cl_gl.h> #endif diff --git a/make/stub_includes/CL20/cl_platform.h b/make/stub_includes/CL20/cl_platform.h index cbde285..b18bbd6 100644 --- a/make/stub_includes/CL20/cl_platform.h +++ b/make/stub_includes/CL20/cl_platform.h @@ -53,6 +53,11 @@ extern "C" { #define GCL_API_SUFFIX__VERSION_1_1 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER #define CL_EXT_SUFFIX__VERSION_1_1 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 + /* OpenCL 2 unavailable on Mac as of 11/1/2015 */ + #define CL_API_SUFFIX__VERSION_2_0 + #define CL_EXT_SUFFIX__VERSION_2_0 + #define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED + #define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED #ifdef AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER #define CL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER diff --git a/make/stub_includes/CL20/opencl.h b/make/stub_includes/CL20/opencl.h index 0c2e639..e8bfc0d 100644 --- a/make/stub_includes/CL20/opencl.h +++ b/make/stub_includes/CL20/opencl.h @@ -32,10 +32,10 @@ extern "C" { #ifdef __APPLE__ -#include <OpenCL/cl.h> -#include <OpenCL/cl_gl.h> -#include <OpenCL/cl_gl_ext.h> -#include <OpenCL/cl_ext.h> +#include <CL/cl.h> +#include <CL/cl_gl.h> +#include <CL/cl_gl_ext.h> +#include <CL/cl_ext.h> #else |