I'm trying to compile code I have written, using both ifort and gfortran. The problem I am having is relating to my use of the preprocessor and directory structure.
In my fortran source I have something like:
In "includes/myinclude1.inc" I want to include another file, say "includes/sub/myinclude2.inc".
In ifort the preprocessor uses the directory relative to the source directory, so in "includes/myinclude1.inc" I may just do:
However, in gfortran it is relative to the location of the current include file, so I instead must do:
Is there a compiler option (either in ifort or gfortran) that will allow me to get the same behavior across compilers?