OpenCL-Headers icon indicating copy to clipboard operation
OpenCL-Headers copied to clipboard

Extend testing when provisional extensions are enabled

Open bashbaug opened this issue 9 months ago • 0 comments

          Could we extend the tests themselves to observe the effects of the macro, for example something like this in`tests/test_ext_headers.c`
int provisional_macro(void) {

#ifdef CL_ENABLE_PROVISIONAL_EXTENSIONS
   printf("%s is available\n", CL_KHR_COMMAND_BUFFER_EXTENSION_NAME);

#else

#ifdef CL_KHR_COMMAND_BUFFER_EXTENSION_NAME
   assert(false && "cl_khr_command_buffer macros should not be defined"); 
   return 1;
#endif // CL_KHR_COMMAND_BUFFER_EXTENSION_NAME
    
#endif // CL_ENABLE_PROVISIONAL_EXTENSIONS

return 0;
}


Originally posted by @EwanC in https://github.com/KhronosGroup/OpenCL-Headers/pull/268#discussion_r1893840241

bashbaug avatar Mar 11 '25 16:03 bashbaug