diff options
author | John S. Urban <urbanjost@comcast.net> | 2021-07-11 16:11:39 -0400 |
---|---|---|
committer | John S. Urban <urbanjost@comcast.net> | 2021-07-11 16:11:39 -0400 |
commit | cca5f83be11f40dd2be86671f8ec14a429540cc9 (patch) | |
tree | ebffeeddffd608f82db70d8683ca68ef22688d67 /src/fpm_backend.f90 | |
parent | f452d20faec8827347f5e6783cb8dfa325c1c301 (diff) | |
download | fpm-cca5f83be11f40dd2be86671f8ec14a429540cc9.tar.gz fpm-cca5f83be11f40dd2be86671f8ec14a429540cc9.zip |
all stops via fpm_stop(1)
Diffstat (limited to 'src/fpm_backend.f90')
-rw-r--r-- | src/fpm_backend.f90 | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/fpm_backend.f90 b/src/fpm_backend.f90 index 8628ec4..e82d847 100644 --- a/src/fpm_backend.f90 +++ b/src/fpm_backend.f90 @@ -27,6 +27,8 @@ !> 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, unix_path use fpm_model, only: fpm_model_t @@ -98,10 +100,10 @@ subroutine build_package(targets,model) if (build_failed) then do j=1,size(stat) if (stat(j) /= 0) then - write(*,*) '<ERROR> Compilation failed for object "',basename(queue(j)%ptr%output_file),'"' + write(stderr,'(*(g0:,1x))') '<ERROR> Compilation failed for object "',basename(queue(j)%ptr%output_file),'"' end if end do - stop 1 + call fpm_stop(1,'stopping due to failed compilation') end if end do @@ -135,8 +137,7 @@ recursive subroutine sort_target(target) ! Check for a circular dependency ! (If target has been touched but not processed) if (target%touched) then - write(*,*) '(!) Circular dependency found with: ',target%output_file - stop + call fpm_stop(1,'(!) Circular dependency found with: '//target%output_file) else target%touched = .true. ! Set touched flag end if |