Skip to content

Commit 39818aa

Browse files
committed
Print target_type as a string
1 parent 8faaa90 commit 39818aa

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

fpm/src/fpm_model.f90

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,19 @@ recursive function info_build_target(t) result(s)
224224
end if
225225
s = s // "]"
226226
! integer :: target_type = FPM_TARGET_UNKNOWN
227-
s = s // ", target_type=" // str(t%target_type)
227+
s = s // ", target_type="
228+
select case(t%target_type)
229+
case (FPM_TARGET_UNKNOWN)
230+
s = s // "FPM_TARGET_UNKNOWN"
231+
case (FPM_TARGET_EXECUTABLE)
232+
s = s // "FPM_TARGET_EXECUTABLE"
233+
case (FPM_TARGET_ARCHIVE)
234+
s = s // "FPM_TARGET_ARCHIVE"
235+
case (FPM_TARGET_OBJECT)
236+
s = s // "FPM_TARGET_OBJECT"
237+
case default
238+
s = s // "INVALID"
239+
end select
228240
! type(string_t), allocatable :: link_libraries(:)
229241
s = s // ", link_libraries=["
230242
if (allocated(t%link_libraries)) then

0 commit comments

Comments
 (0)