Skip to content

Commit 2580a99

Browse files
committed
improve check_gfortran
1 parent 21d2cc8 commit 2580a99

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tools/gfortran_utils.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,15 @@
1818

1919
function check_gfortran {
2020
# Check that gfortran exists on the path
21-
if [ -z "$(which gfortran)" ]; then
21+
if [[ -v FC && -e "$FC" ]]; then
22+
echo using gfortran from FC
23+
echo $FC --version
24+
elif [ -z "$(which gfortran)" ]; then
2225
echo Missing gfortran
2326
exit 1
27+
else
28+
echo using gfortran on the PATH
29+
echo gfortran --version
2430
fi
2531
}
2632

0 commit comments

Comments
 (0)