[petsc-dev] reminder never use #include "mylocalinclude.h" in PETSc source

Barry Smith bsmith at mcs.anl.gov
Mon Mar 14 11:19:30 CDT 2011


On Mar 14, 2011, at 11:03 AM, Matthew Knepley wrote:

> On Mon, Mar 14, 2011 at 11:00 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> 
> On Mar 14, 2011, at 10:33 AM, Jed Brown wrote:
> 
> 
>   I had resisted doing this but maybe it is the way to go.
> 
> I had resisted suggesting this, but if we are going towards all headers separate, I would suggest an alternative.
> 
>   1) Our source, in the source tree, refer to private headers using relative paths or -I
> 
>   2) Install copies all headers under include/private/<sys,ksp,etc>/*
> 
>   3) Outside modules refer to the headers by full path

  1) and 3) are f-ing perverse (I can see why you resisted, you should have continued to resist). ANYTHING that makes externally developed code look "different" then code in the PETSc tree is truly horrible!!! I remember this being a theme of some slide we presented like 16 years ago.

   What is so wrong with having all the includes in the include directory (properly organized)?

   Barry



> 
> Then 3) might break if we move things, but they are writing to private interfaces anyway.
> 
>    Matt
>  
> 
>   Barry
> 
> 
> 
> 
> 
> 
> 
> -- 
> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
> -- Norbert Wiener




More information about the petsc-dev mailing list