@@ -200,6 +200,13 @@ function info_srcfile(source) result(s)
200
200
case default
201
201
s = s // " INVALID"
202
202
end select
203
+ ! type(string_t), allocatable :: modules_provided(:)
204
+ s = s // " , modules_provided=["
205
+ do i = 1 , size (source% modules_provided)
206
+ s = s // ' "' // source% modules_provided(i)% s // ' "'
207
+ if (i < size (source% modules_provided)) s = s // " , "
208
+ end do
209
+ s = s // " ]"
203
210
! integer :: unit_type = FPM_UNIT_UNKNOWN
204
211
s = s // " , unit_type="
205
212
select case (source% unit_type)
@@ -220,42 +227,27 @@ function info_srcfile(source) result(s)
220
227
case default
221
228
s = s // " INVALID"
222
229
end select
223
-
224
- select case (source% unit_type)
225
- case (FPM_UNIT_PROGRAM, FPM_UNIT_MODULE, FPM_UNIT_SUBMODULE, &
226
- FPM_UNIT_SUBPROGRAM, FPM_UNIT_CSOURCE, FPM_UNIT_CHEADER)
227
- ! type(string_t), allocatable :: modules_provided(:)
228
- s = s // " , modules_provided=["
229
- do i = 1 , size (source% modules_provided)
230
- s = s // ' "' // source% modules_provided(i)% s // ' "'
231
- if (i < size (source% modules_provided)) s = s // " , "
232
- end do
233
- s = s // " ]"
234
-
235
- ! type(string_t), allocatable :: modules_used(:)
236
- s = s // " , modules_used=["
237
- do i = 1 , size (source% modules_used)
238
- s = s // ' "' // source% modules_used(i)% s // ' "'
239
- if (i < size (source% modules_used)) s = s // " , "
240
- end do
241
- s = s // " ]"
242
- ! type(string_t), allocatable :: include_dependencies(:)
243
- s = s // " , include_dependencies=["
244
- do i = 1 , size (source% include_dependencies)
245
- s = s // ' "' // source% include_dependencies(i)% s // ' "'
246
- if (i < size (source% include_dependencies)) s = s // " , "
247
- end do
248
- s = s // " ]"
249
- ! type(string_t), allocatable :: link_libraries(:)
250
- s = s // " , link_libraries=["
251
- do i = 1 , size (source% link_libraries)
252
- s = s // ' "' // source% link_libraries(i)% s // ' "'
253
- if (i < size (source% link_libraries)) s = s // " , "
254
- end do
255
- s = s // " ]"
256
- case default
257
- ! pass
258
- end select
230
+ ! type(string_t), allocatable :: modules_used(:)
231
+ s = s // " , modules_used=["
232
+ do i = 1 , size (source% modules_used)
233
+ s = s // ' "' // source% modules_used(i)% s // ' "'
234
+ if (i < size (source% modules_used)) s = s // " , "
235
+ end do
236
+ s = s // " ]"
237
+ ! type(string_t), allocatable :: include_dependencies(:)
238
+ s = s // " , include_dependencies=["
239
+ do i = 1 , size (source% include_dependencies)
240
+ s = s // ' "' // source% include_dependencies(i)% s // ' "'
241
+ if (i < size (source% include_dependencies)) s = s // " , "
242
+ end do
243
+ s = s // " ]"
244
+ ! type(string_t), allocatable :: link_libraries(:)
245
+ s = s // " , link_libraries=["
246
+ do i = 1 , size (source% link_libraries)
247
+ s = s // ' "' // source% link_libraries(i)% s // ' "'
248
+ if (i < size (source% link_libraries)) s = s // " , "
249
+ end do
250
+ s = s // " ]"
259
251
! integer(int64) :: digest
260
252
s = s // " , digest=" // str(source% digest)
261
253
! end type srcfile_t
0 commit comments