In Windows, I have long used iFort's simple compiler directive facility for conditional compilation.
https://software.intel.com/en-us/fortran-compiler-developer-guide-and-re...
for example
!DIR$ IF(FOO==1) do something !DIR$ ELSE do something else !DIR$ ENDIF
In Windows Developer Studio the value of FOO can be set globally in the project properties page in
Configuration Properties > Fortran > Preprocessor > Preprocessor Definitions
in the form FOO=1;FIE=0;FUM=1 ... etc.
These definitions are then applied to all files in the project. Note that this does not require the "Preprocess Source File" property to be Yes.
I am now trying to get this to work in Linux where I am running Code:Blocks for Fortran (CBFortran) as the IDE. CBFortran offers a project build options page with many of the compiler options, but no "Preprocessor Definitions" line. I would appreciate some guidance on how to use Intel's Compiler Directives feature in this context.
....