Skip to content

Commit ada3a00

Browse files
committed
Revert "Small fix for fpm_model"
This reverts commit be9ed41.
1 parent be9ed41 commit ada3a00

File tree

1 file changed

+28
-36
lines changed

1 file changed

+28
-36
lines changed

src/fpm_model.f90

Lines changed: 28 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,13 @@ function info_srcfile(source) result(s)
200200
case default
201201
s = s // "INVALID"
202202
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 // "]"
203210
! integer :: unit_type = FPM_UNIT_UNKNOWN
204211
s = s // ", unit_type="
205212
select case(source%unit_type)
@@ -220,42 +227,27 @@ function info_srcfile(source) result(s)
220227
case default
221228
s = s // "INVALID"
222229
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 // "]"
259251
! integer(int64) :: digest
260252
s = s // ", digest=" // str(source%digest)
261253
!end type srcfile_t

0 commit comments

Comments
 (0)