Hi, I would like to define a series of functional macros intended to be used in several source files, but without altering said source files.
The first thing which came to my mind was to use -D, but I was unable to find any hint if -D can be used to define functional macros. For example: ifort -cpp -D'f(x,y)=x*y' which should be equivalent to #define f(x,y) x*y like it is in gfortran.
The alternative approach would be to use a command line option to include a header file containing all the definitnions, so I could compile multiple files with, say ifort -cpp --header-file=my_header.h.
Is any of those two approaches possible with ifort? Are there any alternatives which won't require the use of #include "my_header.h" in every source file?