diff options
author | Laurence Kedward <laurence.kedward@bristol.ac.uk> | 2021-11-28 11:55:50 +0000 |
---|---|---|
committer | Laurence Kedward <laurence.kedward@bristol.ac.uk> | 2021-11-29 11:56:10 +0000 |
commit | 0c561b0f76bc6fa7777dec884a16b76694913adf (patch) | |
tree | 76d60af0501dc66ee8c81881ef2a01f0ad6039e5 /src/fpm_backend.F90 | |
parent | b0115d1a000ee15d3ca773c3da3300595d805454 (diff) | |
download | fpm-0c561b0f76bc6fa7777dec884a16b76694913adf.tar.gz fpm-0c561b0f76bc6fa7777dec884a16b76694913adf.zip |
Apply suggestion: move run to filesystem and use getline
fpm_environment::run is moved to fpm_filesystem so that it can use the getline function to retrieve redirected output from file
Diffstat (limited to 'src/fpm_backend.F90')
-rw-r--r-- | src/fpm_backend.F90 | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/fpm_backend.F90 b/src/fpm_backend.F90 index e666d03..ceba7ac 100644 --- a/src/fpm_backend.F90 +++ b/src/fpm_backend.F90 @@ -29,8 +29,7 @@ module fpm_backend use,intrinsic :: iso_fortran_env, only : stdin=>input_unit, stdout=>output_unit, stderr=>error_unit use fpm_error, only : fpm_stop -use fpm_environment, only: run, get_os_type, OS_WINDOWS -use fpm_filesystem, only: basename, dirname, join_path, exists, mkdir, LINE_BUFFER_LEN +use fpm_filesystem, only: basename, dirname, join_path, exists, mkdir, run, getline use fpm_model, only: fpm_model_t use fpm_strings, only: string_t, operator(.in.) use fpm_targets, only: build_target_t, build_target_ptr, FPM_TARGET_OBJECT, & @@ -349,13 +348,13 @@ subroutine print_build_log(target) type(build_target_t), intent(in), target :: target integer :: fh, ios - character(LINE_BUFFER_LEN) :: line + character(:), allocatable :: line if (exists(target%output_log_file)) then open(newunit=fh,file=target%output_log_file,status='old') do - read(fh, '(A)', iostat=ios) line + call getline(fh, line, ios) if (ios /= 0) exit write(*,'(A)') trim(line) end do |