[petsc-users] finclude (web) vs petsc-finclude (git)

Jed Brown jed at jedbrown.org
Thu Apr 9 13:49:39 CDT 2015


Juris Vencels <juris.vencels at gmail.com> writes:

> Hi,
>
> I am using PETSc Fortran interface and FindPETSc.cmake script to find PETSc.
> https://github.com/jedbrown/cmake-modules/blob/master/FindPETSc.cmake

Correct me if I'm wrong, but it doesn't sound like your question has
anything to do with this cmake module.

> PETSc from WEB has folder include folder:
>      include/finclude
>
> while PETSc from git has folder:
>      include/petsc-finclude
>
> Is there a way to make it compatible between different versions?

You could create a symlink for that directory (but that's a terrible
hack if you send your code to other people).  You can guard it with the
preprocessor:

#if PETSC_VERSION_LT(3,6,0)
  #include <finclude/petscxyz.h>
#else
  #include <petsc-finclude/petscxyz.h>
#endif


Note that you could define a path splicing macro so that you could write

#include PETSC_FORTRAN_INCLUDE(petscxyz.h)

but CMake's dependency analysis would fail (I think).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150409/21fdf0e3/attachment.pgp>


More information about the petsc-users mailing list