st/clover: Define __OPENCL_VERSION__ on the device side

This is required by the OpenCL standard.

Signed-off-by: Niels Ole Salscheider <niels_ole@salscheider-online.de>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Vedran Miletić <vedran@miletic.net>
This commit is contained in:
Niels Ole Salscheider 2016-08-28 16:42:34 +02:00 committed by Francisco Jerez
parent a8c0c7301c
commit cfa914a1b4
1 changed files with 3 additions and 0 deletions

View File

@ -153,6 +153,9 @@ namespace {
// Add libclc include
c.getPreprocessorOpts().Includes.push_back("clc/clc.h");
// Add definition for the OpenCL version
c.getPreprocessorOpts().addMacroDef("__OPENCL_VERSION__=110");
// clc.h requires that this macro be defined:
c.getPreprocessorOpts().addMacroDef("cl_clang_storage_class_specifiers");
c.getPreprocessorOpts().addRemappedFile(