With gcc and gfortran I can generate a list of preprossesor macros defined by the compiler using (edited to reflect ouah's answer)
gcc -E -dM - < /dev/null
and
gfortran -cpp -E -dM /dev/null
respectively (on Linux at least).
How can I do the same with the Intel compilers icc and ifort? I know that for ifort these macros are defined here, but I would like to be able to generate this list myself, since the exact macros in use and their values will depend on the compiler options used. I am also aware of the predef project.
With the Intel Fortran compiler, ifort, the following can be used:
ifort -E -fpp /dev/null -dryrun 2>&1 | grep -e -D | cut -c 5-
It seems than ifort does not have an equivalent -dM
flag like icc, gfortran and gcc do.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With