Skip to content

Commit e190db9

Browse files
committed
Don't add FFLAGS for non-gnu non-intel compilers
1 parent eba890a commit e190db9

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

configure.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,19 @@ if [[ -z $FC ]]; then
4040
fi
4141

4242
# This is a very crude heuristic
43-
comp=$(basename $FC)
43+
comp=$(basename "$FC")
4444
if [[ "$comp" = ifx || "$comp" = ifort || "$comp" = mpiifort ]]; then
4545
FCTYPE=intel
46-
else
46+
elif [[ "$comp" = gfortran ]]; then
4747
FCTYPE=gnu
48+
else
49+
FCTYPE=unknown
4850
fi
4951

5052
# Set default FFLAGS
5153
if [[ $FCTYPE = intel ]]; then
5254
DEFAULT_FFLAGS="-i4 -check bounds,nouninit,noarg_temp_created -g -traceback -O0 -heap-arrays"
53-
else
55+
elif [[ $FCTYPE = gnu ]]; then
5456
warning_flags="-Wall -Wno-unused-dummy-argument -Wno-integer-division -Wno-unused-function -Wno-maybe-uninitialized"
5557
# TODO: We should probably trap also "invalid" floating-point exception,
5658
# but need to fix some tests first that currently trigger them :-(

0 commit comments

Comments
 (0)