@@ -78,7 +78,7 @@ BINDIR='./bin/' # build directory for unit tests
78
78
LIBDIR=' ./lib/' # build directory for library
79
79
MODCODE=' json_module.F90' # json module file name
80
80
LIBOUT=' libjsonfortran.a' # name of json library
81
-
81
+ FPP= " gfortran -E " # default to gfortran -E pre-processing
82
82
83
83
# The following warning might be triggered by ifort unless explicitly silenced:
84
84
# warning #7601: F2008 standard does not allow an internal procedure to be an actual argument procedure name. (R1214.4).
@@ -122,18 +122,21 @@ while [ "$#" -ge "1" ]; do # Get command line arguments while there are more lef
122
122
intel|Intel|INTEL|ifort)
123
123
FCOMPILER=' Intel'
124
124
FCOMPILERFLAGS=" $INTELCOMPILERFLAGS "
125
+ FPP=" fpp"
125
126
shift
126
127
;;
127
128
gnu|Gnu|GNU|gfortran|Gfortran|GFortran|GFORTRAN)
128
129
FCOMPILER=' gnu'
129
130
FCOMPILERFLAGS=" $GNUCOMPILERFLAGS "
131
+ FPP=" gfortran -E"
130
132
shift
131
133
;;
132
134
* )
133
135
FCOMPILER=" custom"
134
136
echo " Warning: Trying to build with unsupported compiler, $2 ." 1>&2
135
137
echo " Please ensure you set appropriate --cflags and (single) quote them" 1>&2
136
138
FC=" $2 "
139
+ FPP=" gfortran -E" # try gfortran to preprocess as a default
137
140
shift
138
141
;;
139
142
esac
@@ -344,6 +347,7 @@ if [[ $JF_SKIP_DOCS != [yY]* ]]; then
344
347
if hash ford 2> /dev/null; then
345
348
echo " Building documentation..."
346
349
[[ $TRY_UNICODE = [yY]* ]] && MACRO_FLAG=(" -m" " USE_UCS4" )
350
+ echo " $FPP " > preprocessor-def.md # Override via include in project file, until FORD gets CLI for this
347
351
ford --debug " ${MACRO_FLAG[@]} " -p " $PAGESDIR " " $FORDMD "
348
352
else
349
353
echo " FORD not found! Install using: sudo pip install ford"
0 commit comments