aboutsummaryrefslogtreecommitdiff
path: root/src/fpm_compiler.f90
diff options
context:
space:
mode:
authorLaurence Kedward <laurence.kedward@bristol.ac.uk>2021-11-28 11:11:11 +0000
committerLaurence Kedward <laurence.kedward@bristol.ac.uk>2021-11-29 11:54:17 +0000
commit4556e7a4435c6ef2da8782c033229e06e91b6a4e (patch)
treef24d55adb5364948ec0733473cf56bfb5dc8daab /src/fpm_compiler.f90
parentfc058eca31036584649cd3b712a649e9dd01c2d7 (diff)
downloadfpm-4556e7a4435c6ef2da8782c033229e06e91b6a4e.tar.gz
fpm-4556e7a4435c6ef2da8782c033229e06e91b6a4e.zip
Apply suggestion: move echo/verbosity into constructors
For compiler_t and archive_t objects
Diffstat (limited to 'src/fpm_compiler.f90')
-rw-r--r--src/fpm_compiler.f9019
1 files changed, 15 insertions, 4 deletions
diff --git a/src/fpm_compiler.f90 b/src/fpm_compiler.f90
index dba21b2..2f939ad 100644
--- a/src/fpm_compiler.f90
+++ b/src/fpm_compiler.f90
@@ -623,16 +623,22 @@ end function enumerate_libraries
!> Create new compiler instance
-subroutine new_compiler(self, fc, cc)
+subroutine new_compiler(self, fc, cc, echo, verbose)
!> New instance of the compiler
type(compiler_t), intent(out) :: self
!> Fortran compiler name or path
character(len=*), intent(in) :: fc
!> C compiler name or path
character(len=*), intent(in) :: cc
+ !> Echo compiler command
+ logical, intent(in) :: echo
+ !> Verbose mode: dump compiler output
+ logical, intent(in) :: verbose
self%id = get_compiler_id(fc)
-
+
+ self%echo = echo
+ self%verbose = verbose
self%fc = fc
if (len_trim(cc) > 0) then
self%cc = cc
@@ -643,11 +649,15 @@ end subroutine new_compiler
!> Create new archiver instance
-subroutine new_archiver(self, ar)
+subroutine new_archiver(self, ar, echo, verbose)
!> New instance of the archiver
type(archiver_t), intent(out) :: self
!> User provided archiver command
character(len=*), intent(in) :: ar
+ !> Echo compiler command
+ logical, intent(in) :: echo
+ !> Verbose mode: dump compiler output
+ logical, intent(in) :: verbose
integer :: estat, os_type
@@ -681,7 +691,8 @@ subroutine new_archiver(self, ar)
end if
end if
self%use_response_file = os_type == OS_WINDOWS
- self%echo = .true.
+ self%echo = echo
+ self%verbose = verbose
end subroutine new_archiver