|
11 | 11 | # build.sh [--compiler {intel|gnu|<other>}] [--cflags '<custom compiler flags here>']
|
12 | 12 | # [--coverage [{yes|no}]] [--profile [{yes|no}]] [--skip-tests [{yes|no}]]
|
13 | 13 | # [--skip-documentation [{yes|no}]] [--enable-unicode [{yes|no}]] [--help]
|
14 |
| -# [--clean] |
| 14 | +# [--clean] [--real-kind [{REAL32\REAL64\REAL128}]] |
| 15 | +# [--int-kind [{INT8\INT16\INT32\INT64}]] |
15 | 16 | #
|
16 | 17 | # By default, if invoked without any flags, this build script will build the
|
17 | 18 | # JSON-Fortran library using gfortran,
|
|
22 | 23 | # with :
|
23 | 24 | # unit tests enabled
|
24 | 25 | # documentation (if FORD is installed)
|
| 26 | +# real(REAL64) kinds |
| 27 | +# integer(INT32) kinds |
25 | 28 | #
|
26 | 29 | # More recent (right-most) flags will override preceding flags
|
27 | 30 | # flags:
|
@@ -146,6 +149,18 @@ while [ "$#" -ge "1" ]; do # Get command line arguments while there are more lef
|
146 | 149 | # no good way to check that the user didn't do something questionable
|
147 | 150 | shift
|
148 | 151 | ;;
|
| 152 | + --real-kind) |
| 153 | + REAL_KIND="-D$2" |
| 154 | + # warning: not checking for valid input |
| 155 | + # should be one of: REAL32, REAL64 [default], REAL128 |
| 156 | + shift |
| 157 | + ;; |
| 158 | + --int-kind) |
| 159 | + INT_KIND="-D$2" |
| 160 | + # warning: not checking for valid input |
| 161 | + # should be one of: INT8, INT16, INT32 [default], INT64 |
| 162 | + shift |
| 163 | + ;; |
149 | 164 | --enable-unicode)
|
150 | 165 | case $2 in
|
151 | 166 | yes|Yes|YES)
|
@@ -178,7 +193,7 @@ while [ "$#" -ge "1" ]; do # Get command line arguments while there are more lef
|
178 | 193 | ;;
|
179 | 194 | esac
|
180 | 195 | ;;
|
181 |
| - --profile) #nable profiling |
| 196 | + --profile) #enable profiling |
182 | 197 | case $2 in
|
183 | 198 | yes|Yes|YES)
|
184 | 199 | CODE_PROFILE="yes"
|
|
272 | 287 | echo ""
|
273 | 288 | echo "Building library..."
|
274 | 289 |
|
275 |
| -FoBiS.py build -ch -compiler ${FCOMPILER} "${CUSTOM[@]}" -cflags "${FCOMPILERFLAGS} ${DEFINES}" ${COVERAGE} ${PROFILING} -dbld ${LIBDIR} -s ${SRCDIR} -dmod ./ -dobj ./ -t ${MODCODE} -o ${LIBOUT} -mklib static -colors |
| 290 | +FoBiS.py build -ch -compiler ${FCOMPILER} "${CUSTOM[@]}" -cflags "${FCOMPILERFLAGS} ${DEFINES} ${REAL_KIND} ${INT_KIND}" ${COVERAGE} ${PROFILING} -dbld ${LIBDIR} -s ${SRCDIR} -dmod ./ -dobj ./ -t ${MODCODE} -o ${LIBOUT} -mklib static -colors |
276 | 291 |
|
277 | 292 | #build the unit tests (uses the above library):
|
278 | 293 | if [[ $JF_SKIP_TESTS != [yY]* ]]; then
|
|
0 commit comments