filter_executable_targets Subroutine

public subroutine filter_executable_targets(targets, scope, list)

Arguments

Type IntentOptional Attributes Name
type(build_target_ptr), intent(in) :: targets(:)
integer, intent(in) :: scope
type(string_t), intent(out), allocatable :: list(:)

Source Code

subroutine filter_executable_targets(targets, scope, list)
    type(build_target_ptr), intent(in) :: targets(:)
    integer, intent(in) :: scope
    type(string_t), allocatable, intent(out) :: list(:)

    integer :: i, n

    n = 0
    call resize(list)
    do i = 1, size(targets)
        if (is_executable_target(targets(i)%ptr, scope)) then
            if (n >= size(list)) call resize(list)
            n = n + 1
            list(n)%s = targets(i)%ptr%output_file
        end if
    end do
    call resize(list, n)
end subroutine filter_executable_targets