[petsc-dev] How to deal with OS-specific include paths?
Karl Rupp
rupp at mcs.anl.gov
Mon Mar 18 20:08:12 CDT 2013
Hi,
> We test each variant until we find one that works. I don't think there
> is an automatic way to do that currently so you'd have to call
> checkCompile() in sequence.
Ok, thanks, I'll (try to) adapt the code from the OpenMP package checker
then.
> So, the question is: How to deal with these OS-specific things?
> Within header files there is the standard
> #if defined(__APPLE__)
>
>
> We (almost) never do this in the C file because it's fragile and fails
> too late. Instead, configure would normally test and set a macro
> indicating how to do it safely.
Right now I don't need a preprocessor switch for PETSc, I could even
extract the OpenCL headers from the ViennaCL-package. This, however,
would be a fairly bad workaround, so I prefer to have ViennaCL and
OpenCL detected correctly separate from each other. Thus, I need to
check the presence of the OpenCL headers even though I don't need them
directly in PETSc.
Best regards,
Karli
More information about the petsc-dev
mailing list