@@ -12,7 +12,7 @@ subroutine add_compile_flag_defaults(build_name,compiler,model)
12
12
! could just be a function to return a string instead of passing model
13
13
! but likely to change other components like matching C compiler
14
14
15
- character (len= :),allocatable :: fflags ! optional flags that might be overridden by user
15
+ character (len= :),allocatable :: fflags ! optional flags that might be overridden by user
16
16
character (len= :),allocatable :: modpath
17
17
character (len= :),allocatable :: mandatory ! flags required for fpm to function properly;
18
18
! ie. add module path and module include directory as appropriate
@@ -42,6 +42,24 @@ subroutine add_compile_flag_defaults(build_name,compiler,model)
42
42
! G95 ? ? -fmod= -I -fopenmp discontinued
43
43
! Open64 ? ? -module -I -mp discontinued
44
44
! Unisys ? ? ? ? ? discontinued
45
+ character (len=* ),parameter :: names(* )= [ character (len= 10 ) :: &
46
+ & ' caf' , &
47
+ & ' gfortran' , &
48
+ & ' f95' , &
49
+ & ' nvfortran' , &
50
+ & ' ifort' , &
51
+ & ' ifx' , &
52
+ & ' pgfortran' , &
53
+ & ' pgf90' , &
54
+ & ' pgf95' , &
55
+ & ' flang' , &
56
+ & ' lfc' , &
57
+ & ' nagfor' , &
58
+ & ' crayftn' , &
59
+ & ' xlf90' , &
60
+ & ' unknown' ]
61
+ integer :: i
62
+
45
63
modpath= join_path(model% output_directory,model% package_name)
46
64
fflags= ' '
47
65
mandatory= ' '
@@ -143,7 +161,6 @@ subroutine add_compile_flag_defaults(build_name,compiler,model)
143
161
& -reentrancy threaded&
144
162
& -nogen-interfaces&
145
163
& -assume byterecl&
146
- & -assume nounderscore&
147
164
&'
148
165
mandatory= ' -module ' // modpath// ' -I ' // modpath
149
166
case (' debug_ifort' )
@@ -219,10 +236,8 @@ subroutine add_compile_flag_defaults(build_name,compiler,model)
219
236
case default
220
237
fflags = ' '
221
238
mandatory= ' -module ' // modpath// ' -I ' // modpath
222
- write (* ,* )' <WARNING> unknown compiler (' ,compiler,' )'
223
- write (* ,* )' and build name (' ,build_name,' )'
224
- write (* ,* )' combination.'
225
- write (* ,* )' known compilers are gfortran, nvfortran, ifort'
239
+ write (* ,' (*(a))' )' <WARNING> unknown compiler (' ,compiler,' ) and build name (' ,build_name,' ) combination.'
240
+ write (* ,' (a,*(T31,6(a:,", "),/))' )' known compilers are ' ,(trim (names(i)),i= 1 ,size (names)- 1 )
226
241
end select
227
242
228
243
model% fortran_compile_flags = fflags// ' ' // mandatory
0 commit comments