Re: Help with gfortran

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sébastien Le Roux wrote:
Hello everyone,
I am trying to find the way to call the fortran pre-processor prior than the
gfortran compiler. I have to compile my code wrote with MPI calls
on a single proc computer, and I don't know how not to compile #ifdef MPI ... #endif instructions. It works on another computer using the intel fortran compiler
with the '-fpp' option which call the pre-processor first.
Be shure that I checked the GNU gcc and gfortran documentation first,
unfortunately without any success.
The usual way (on an OS which supports case sensitivity in file names) is with the suffices .F or .F90 to set the tradcpp option implicitly, also supported by ifort. If you run gfortran -v yourfile.F (even on a non-case-sensitive OS) you will see that the option -fpreprocessed is set. Perhaps the info file could be improved. I'm wondering why gfortran doesn't support the -x f option, so that a sequence like
gcc -E -traditional yourfile.f > yourfile.fpp
gfortran -x f yourfile.fpp
could work.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux