Transfer collected name patterns into a run/test settings object.
The names array contains tokens collected from positional arguments in
fpm-watch run/test invocations. Only non-empty entries are copied.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(fpm_run_settings), | intent(inout) | :: | s | |||
| type(string_t), | intent(in), | allocatable | :: | names(:) |
pure subroutine set_names(s, names) class(fpm_run_settings), intent(inout) :: s type(string_t), allocatable, intent(in) :: names(:) integer :: i, k, n if (.not. allocated(names)) return n = 0 do i = 1, size(names) if (len_trim(names(i)%s) > 0) n = n + 1 end do if (n == 0) return allocate(s%name(n)) k = 0 do i = 1, size(names) if (len_trim(names(i)%s) == 0) cycle k = k + 1 s%name(k) = trim(names(i)%s) end do end subroutine set_names