Add link directories for all shared libraries in the dependency graph
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(fpm_model_t), | intent(in) | :: | model | |||
type(build_target_ptr), | intent(inout), | target | :: | targets(:) | ||
type(string_t), | intent(out), | allocatable | :: | shared_lib_dirs(:) |
subroutine get_library_dirs(model, targets, shared_lib_dirs) type(fpm_model_t), intent(in) :: model type(build_target_ptr), intent(inout), target :: targets(:) type(string_t), allocatable, intent(out) :: shared_lib_dirs(:) integer :: i type(string_t) :: temp allocate(shared_lib_dirs(0)) do i = 1, size(targets) associate(target => targets(i)%ptr) if (all(target%target_type /= [FPM_TARGET_SHARED,FPM_TARGET_ARCHIVE])) cycle if (target%output_dir .in. shared_lib_dirs) cycle temp = string_t(target%output_dir) shared_lib_dirs = [shared_lib_dirs, temp] end associate end do end subroutine get_library_dirs