Returns pointers to all library targets
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(build_target_ptr), | intent(in) | :: | targets(:) | |||
type(build_target_ptr), | intent(out), | allocatable | :: | list(:) |
subroutine filter_library_targets(targets, list) type(build_target_ptr), intent(in) :: targets(:) type(build_target_ptr), allocatable, intent(out) :: list(:) integer :: i, n n = 0 do i = 1, size(targets) if (any(targets(i)%ptr%target_type == [FPM_TARGET_ARCHIVE,FPM_TARGET_SHARED])) then n = n + 1 end if end do allocate(list(n)) n = 0 do i = 1, size(targets) if (any(targets(i)%ptr%target_type == [FPM_TARGET_ARCHIVE,FPM_TARGET_SHARED])) then n = n + 1 list(n)%ptr => targets(i)%ptr end if end do end subroutine filter_library_targets