From 8faaa90082ea17c0ea4a774ed0eb58adb8cf44c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Wed, 23 Dec 2020 09:53:01 -0700 Subject: Print unit_scope as a string instead of a number --- fpm/src/fpm_model.f90 | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/fpm/src/fpm_model.f90 b/fpm/src/fpm_model.f90 index 72c0b04..2963b97 100644 --- a/fpm/src/fpm_model.f90 +++ b/fpm/src/fpm_model.f90 @@ -272,7 +272,23 @@ s = s // 'file_name="' // source%file_name // '"' ! character(:), allocatable :: exe_name s = s // ', exe_name="' // source%exe_name // '"' ! integer :: unit_scope = FPM_SCOPE_UNKNOWN -s = s // ", unit_scope=" // str(source%unit_scope) +s = s // ", unit_scope=" +select case(source%unit_scope) +case (FPM_SCOPE_UNKNOWN) + s = s // "FPM_SCOPE_UNKNOWN" +case (FPM_SCOPE_LIB) + s = s // "FPM_SCOPE_LIB" +case (FPM_SCOPE_DEP) + s = s // "FPM_SCOPE_DEP" +case (FPM_SCOPE_APP) + s = s // "FPM_SCOPE_APP" +case (FPM_SCOPE_TEST) + s = s // "FPM_SCOPE_TEST" +case (FPM_SCOPE_EXAMPLE) + s = s // "FPM_SCOPE_EXAMPLE" +case default + s = s // "INVALID" +end select ! type(string_t), allocatable :: modules_provided(:) s = s // ", modules_provided=[" do i = 1, size(source%modules_provided) -- cgit v1.2.3