Does anybody know if there is a way to specify preprocessor include path with fortitude?
Given the following:
module mParam
#include "petsc/finclude/petsc.h"
use petscsys
IMPLICIT NONE
PetscReal,Parameter :: PReal = 1.0
end module mParam
fortitude throws an error E001, presumedly because it does not know that PetscReal is defined in a file included from $PETSC_DIR/$PETSC_ARCH/include/petsc/finclude/petsc.h.
Preprocessor integration is on the to do list for Fortitude, but is not going to be easy. My workaround is to compile with the relevant flags to preprocessor and save the intermediate code, then run Fortitude on the intermediate preprocessor output. But, this means I cannot use the autocorrection facilities. CPP/FPP simulation and integration is going to be messy, but fypp could be a nightmare.
My pre-processor usage is much simpler - just alternate code paths rather than includes. Fortitude still has some issues with that, but I find that if you just put a ignore E001, it will still check the rest of the file which is sufficient for me.