I've got a large Fortran codebase that originally targeted Intel's compiler. I'm now gearing up to compile with gfortran. Unfortunately, the code is littered with Intel-style pre-processing directives like:
!DEC$ IF DEFINED (MYDIRECTIVE)
REAL, DIMENSION(:,:,:), ALLOCATABLE :: my_real_var
!DEC$ ENDIF
From what I can tell via googling and the gfortran docs, there is no internal gfortran support for anything besides C-style pre-processing, like:
#if defined MYDIRECTIVE
REAL, DIMENSION(:,:,:), ALLOCATABLE :: my_real_var
#endif
Has anyone else encountered this problem and come up with an elegant solution? Obviously, I could write a shell script which calls an external pre-processor before passing code to gfortran for compile, but this just doesn't seem like a terrific solution to me.
Any thoughts? Thanks SO gurus!