You can use your own petsc.h

#include <petscversion.h>
#if (PETSC_VERSION_MAJOR==3 && PETSC_VERSION_MINOR<=5)
#include <finclude/petsc.h90>
#else
#include <petsc-finclude/petsc.h90>
#endif

which you can then include in your code as ...

program foo
#include "petsc.h"
...
end program foo

Tabrez

On 04/09/2015 12:55 PM, Juris Vencels wrote:
Hi,

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

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?

Thanks!

Reply via email to