Compile a Fortran object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(compiler_t), | intent(in) | :: | self |
Instance of the compiler object |
||
character(len=*), | intent(in) | :: | input |
Source file input |
||
character(len=*), | intent(in) | :: | output |
Output file of object |
||
character(len=*), | intent(in) | :: | args |
Arguments for compiler |
||
character(len=*), | intent(in) | :: | log_file |
Compiler output log file |
||
integer, | intent(out) | :: | stat |
Status flag |
subroutine compile_fortran(self, input, output, args, log_file, stat)
!> Instance of the compiler object
class(compiler_t), intent(in) :: self
!> Source file input
character(len=*), intent(in) :: input
!> Output file of object
character(len=*), intent(in) :: output
!> Arguments for compiler
character(len=*), intent(in) :: args
!> Compiler output log file
character(len=*), intent(in) :: log_file
!> Status flag
integer, intent(out) :: stat
call run(self%fc // " -c " // input // " " // args // " -o " // output, &
& echo=self%echo, verbose=self%verbose, redirect=log_file, exitstat=stat)
end subroutine compile_fortran