Now concentrate the version assignment at the root cmake files.
All the other place will refer the specified macros other than
hard coded a number.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Song, Ruiling <ruiling.song@intel.com>
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0)
PROJECT(OCL)
-set (LIBCL_VERSION_MAJOR 0)
-set (LIBCL_VERSION_MINOR 2)
+set (LIBCL_DRIVER_VERSION_MAJOR 0)
+set (LIBCL_DRIVER_VERSION_MINOR 2)
+set (LIBCL_C_VERSION_MAJOR 1)
+set (LIBCL_C_VERSION_MINOR 1)
configure_file (
"src/OCLConfig.h.in"
// the configured options and settings for LIBCL
-#define LIBCL_VERSION_MAJOR @LIBCL_VERSION_MAJOR@
-#define LIBCL_VERSION_MINOR @LIBCL_VERSION_MINOR@
+#define LIBCL_DRIVER_VERSION_MAJOR @LIBCL_DRIVER_VERSION_MAJOR@
+#define LIBCL_DRIVER_VERSION_MINOR @LIBCL_DRIVER_VERSION_MINOR@
+#define LIBCL_C_VERSION_MAJOR @LIBCL_C_VERSION_MAJOR@
+#define LIBCL_C_VERSION_MINOR @LIBCL_C_VERSION_MINOR@
.JOIN(FIELD,_sz) = sizeof(STRING) + 1,
DECL_INFO_STRING(name, "Intel HD Graphics Family")
DECL_INFO_STRING(vendor, "Intel")
-DECL_INFO_STRING(version, OCL_VERSION_STRING)
+DECL_INFO_STRING(version, LIBCL_VERSION_STRING)
DECL_INFO_STRING(profile, "FULL_PROFILE")
-DECL_INFO_STRING(opencl_c_version, "OpenCL C 1.1")
+DECL_INFO_STRING(opencl_c_version, LIBCL_C_VERSION_STRING)
DECL_INFO_STRING(extensions, "")
DECL_INFO_STRING(built_in_kernels, "")
-DECL_INFO_STRING(driver_version, LIBCL_VERSION_STRING)
+DECL_INFO_STRING(driver_version, LIBCL_DRIVER_VERSION_STRING)
#undef DECL_INFO_STRING
egl_context = (EGLDisplay)ctx->props.gl_context;
return egl_funcs->eglCreateImageKHR_func(egl_display, egl_context,
EGL_GL_TEXTURE_2D_KHR,
- (EGLClientBuffer)texture,
+ (EGLClientBuffer)(uintptr_t)texture,
&egl_attribs[0]);
}
static struct _cl_platform_id intel_platform_data = {
INIT_ICD(dispatch)
DECL_INFO_STRING(profile, "FULL_PROFILE")
- DECL_INFO_STRING(version, OCL_VERSION_STRING)
+ DECL_INFO_STRING(version, LIBCL_VERSION_STRING)
DECL_INFO_STRING(name, "Experiment Intel Gen OCL Driver")
DECL_INFO_STRING(vendor, "Intel")
DECL_INFO_STRING(icd_suffix_khr, "Intel")
void * param_value,
size_t * param_value_size_ret);
-#define OCL_VERSION_MAJOR 1
-#define OCL_VERSION_MINOR 1
-
#define _STR(x) #x
#define _JOINT(x, y) _STR(x) "." _STR(y)
-#define OCL_VERSION_STRING "OpenCL " _JOINT(OCL_VERSION_MAJOR, OCL_VERSION_MINOR)
-#define LIBCL_VERSION_STRING _JOINT(LIBCL_VERSION_MAJOR, LIBCL_VERSION_MINOR)
+#define LIBCL_VERSION_STRING "OpenCL " _JOINT(LIBCL_C_VERSION_MAJOR, LIBCL_C_VERSION_MINOR)
+#define LIBCL_C_VERSION_STRING "OpenCL C " _JOINT(LIBCL_C_VERSION_MAJOR, LIBCL_C_VERSION_MINOR)
+#define LIBCL_DRIVER_VERSION_STRING _JOINT(LIBCL_DRIVER_VERSION_MAJOR, LIBCL_DRIVER_VERSION_MINOR)
#endif /* __CL_PLATFORM_ID_H__ */