[petsc-dev] How to deal with OS-specific include paths?

Karl Rupp rupp at mcs.anl.gov
Mon Mar 18 20:14:54 CDT 2013


Hi,

On 03/18/2013 08:06 PM, Barry Smith wrote:
>
>    Apple really sucks:
>
> (...)
>

They even manage to make the official OpenCL headers inject this stuff.
 From opencl.h:

#ifdef __APPLE__
#include <OpenCL/cl.h>
#include <OpenCL/cl_gl.h>
#include <OpenCL/cl_gl_ext.h>
#include <OpenCL/cl_ext.h>
#else
#include <CL/cl.h>
#include <CL/cl_gl.h>
#include <CL/cl_gl_ext.h>
#include <CL/cl_ext.h>
#endif

Okay, so reasonably you could expect that users only need to include 
opencl.h into their applications and that takes care of the correct 
paths. Well, all theory, dear friend, is gray, and so it happens that 
opencl.h resides in OpenCL/ and CL/ respectively :-D

Best regards,
Karli





More information about the petsc-dev mailing list