File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -60,10 +60,8 @@ if [ $# == 0 ]; then
60
60
exit 1
61
61
fi
62
62
63
- # Default to "mpif90" Fortran compiler if environment variable CAFC has zero length:
64
- if [ -z "$CAFC" ]; then
65
- CAFC=mpif90
66
- fi
63
+ # Default to "mpif90" Fortran compiler if environment variable CAFC is empty or unset:
64
+ CAFC=${CAFC:-mpif90}
67
65
68
66
# TODO -- improve the syntax of the "set" command below to accepted an unlimited number of arguments
69
67
max_arguments=100
Original file line number Diff line number Diff line change @@ -53,6 +53,11 @@ if(opencoarrays_aware_compiler)
53
53
else ()
54
54
file (APPEND "${compiler_wrapper} " "caf_compiler=false\n " )
55
55
endif ()
56
+
57
+ if ( DEFINED ENV{FC} )
58
+ file (APPEND "${compiler_wrapper} " "CAFC=$ENV{FC} \n " )
59
+ endif ()
60
+
56
61
if ("${CMAKE_SYSTEM_NAME} " MATCHES "Linux" )
57
62
file (APPEND "${compiler_wrapper} " "linux=true\n " )
58
63
endif ()
You can’t perform that action at this time.
0 commit comments