aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndřej Čertík <ondrej@certik.us>2020-12-23 09:53:01 -0700
committerOndřej Čertík <ondrej@certik.us>2020-12-23 09:53:01 -0700
commit8faaa90082ea17c0ea4a774ed0eb58adb8cf44c3 (patch)
tree8f6c5442ab09e7f6978ba187c3f5de7b80381223
parent5150bf66964c800a0e65b404f5c3722baad295dd (diff)
downloadfpm-8faaa90082ea17c0ea4a774ed0eb58adb8cf44c3.tar.gz
fpm-8faaa90082ea17c0ea4a774ed0eb58adb8cf44c3.zip
Print unit_scope as a string instead of a number
-rw-r--r--fpm/src/fpm_model.f9018
1 files changed, 17 insertions, 1 deletions
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)