File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -209,20 +209,23 @@ subroutine build_target(model,target)
209
209
// " -o " // target % output_file)
210
210
211
211
case (FPM_TARGET_EXECUTABLE)
212
+
213
+ link_flags = string_cat(target % link_objects," " )
214
+
212
215
if (allocated (model% library_file)) then
213
- link_flags = " " // model% library_file// " " // model% link_flags
216
+ link_flags = link_flags // " " // model% library_file// " " // model% link_flags
214
217
else
215
- link_flags = " " // model% link_flags
218
+ link_flags = link_flags // " " // model% link_flags
216
219
end if
217
220
218
221
if (allocated (target % link_libraries)) then
219
222
if (size (target % link_libraries) > 0 ) then
220
223
link_flags = link_flags // " -l" // string_cat(target % link_libraries," -l" )
221
224
end if
222
225
end if
223
-
224
- call run(" gfortran " // string_cat( target % link_objects, " " ) // model% fortran_compile_flags &
225
- // link_flags// " -o " // target % output_file)
226
+
227
+ call run(" gfortran " // model% fortran_compile_flags &
228
+ // " " // link_flags// " -o " // target % output_file)
226
229
227
230
case (FPM_TARGET_ARCHIVE)
228
231
call run(" ar -rs " // target % output_file // " " // string_cat(target % link_objects," " ))
Original file line number Diff line number Diff line change @@ -150,7 +150,10 @@ function string_cat(strings,delim) result(cat)
150
150
integer :: i,n
151
151
character (:), allocatable :: delim_str
152
152
153
- if (size (strings) < 1 ) return
153
+ if (size (strings) < 1 ) then
154
+ cat = ' '
155
+ return
156
+ end if
154
157
155
158
if (present (delim)) then
156
159
delim_str = delim
You can’t perform that action at this time.
0 commit comments