Skip to content

Commit 060eecc

Browse files
committed
Update: build verbose to also output include dirs
1 parent 9d1af51 commit 060eecc

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

fpm/src/fpm.f90

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module fpm
2-
use fpm_strings, only: string_t, operator(.in.), glob, join
2+
use fpm_strings, only: string_t, operator(.in.), glob, join, string_cat
33
use fpm_backend, only: build_package
44
use fpm_command_line, only: fpm_build_settings, fpm_new_settings, &
55
fpm_run_settings, fpm_install_settings, fpm_test_settings
@@ -44,11 +44,6 @@ subroutine build_model(model, settings, package, error)
4444
character(len=:), allocatable :: manifest, lib_dir
4545
type(string_t) :: include_dir
4646

47-
if(settings%verbose)then
48-
write(*,*)'<INFO>BUILD_NAME:',settings%build_name
49-
write(*,*)'<INFO>COMPILER: ',settings%compiler
50-
endif
51-
5247
model%package_name = package%name
5348

5449
allocate(model%include_dirs(0))
@@ -67,9 +62,6 @@ subroutine build_model(model, settings, package, error)
6762
model%output_directory = join_path('build',basename(model%fortran_compiler)//'_'//settings%build_name)
6863

6964
call add_compile_flag_defaults(settings%build_name, basename(model%fortran_compiler), model)
70-
if(settings%verbose)then
71-
write(*,*)'<INFO>COMPILER OPTIONS: ', model%fortran_compile_flags
72-
endif
7365

7466
allocate(model%packages(model%deps%ndep))
7567

@@ -172,6 +164,13 @@ subroutine build_model(model, settings, package, error)
172164
end do
173165
if (allocated(error)) return
174166

167+
if (settings%verbose) then
168+
write(*,*)'<INFO> BUILD_NAME: ',settings%build_name
169+
write(*,*)'<INFO> COMPILER: ',settings%compiler
170+
write(*,*)'<INFO> COMPILER OPTIONS: ', model%fortran_compile_flags
171+
write(*,*)'<INFO> INCLUDE DIRECTORIES: [', string_cat(model%include_dirs,','),']'
172+
end if
173+
175174
end subroutine build_model
176175

177176

0 commit comments

Comments
 (0)