1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
module modules_37_fpm_backend
implicit none
public :: build_package
type, abstract :: fpm_cmd_settings
logical :: verbose=.true.
end type
type, extends(fpm_cmd_settings) :: fpm_build_settings
end type
type string_t
character(len=:), allocatable :: s
end type
type build_target_ptr
type(build_target_t), pointer :: ptr => null()
end type build_target_ptr
type build_target_t
character(:), allocatable :: output_dir
end type build_target_t
type :: fpm_model_t
end type fpm_model_t
contains
subroutine build_package(targets, model, verbose)
type(build_target_ptr), intent(inout) :: targets(:)
type(fpm_model_t), intent(in) :: model
logical, intent(in) :: verbose
integer :: i, j
type(string_t), allocatable :: build_dirs(:)
type(string_t) :: temp
allocate(build_dirs(0))
do i = 1, size(targets)
associate(target => targets(i)%ptr)
temp%s = target%output_dir
build_dirs = [build_dirs, temp]
end associate
end do
end subroutine build_package
subroutine cmd_build(settings)
type(fpm_build_settings), intent(in) :: settings
type(fpm_model_t) :: model
type(build_target_ptr), allocatable :: targets(:)
call build_package(targets, model, verbose=settings%verbose)
end subroutine cmd_build
end module modules_37_fpm_backend
program modules_37
implicit none
print *, "executing modules_37"
end program modules_37
|