@@ -36,6 +36,7 @@ module fpm_backend
36
36
FPM_TARGET_C_OBJECT, FPM_TARGET_ARCHIVE, FPM_TARGET_EXECUTABLE, &
37
37
FPM_TARGET_CPP_OBJECT
38
38
use fpm_backend_output
39
+ use fpm_compile_commands, only: compile_command_table_t
39
40
implicit none
40
41
41
42
private
@@ -125,7 +126,7 @@ subroutine build_package(targets,model,verbose)
125
126
126
127
if (.not. skip_current) then
127
128
call progress% compiling_status(j)
128
- call build_target(model,queue(j)% ptr,verbose,stat(j))
129
+ call build_target(model,queue(j)% ptr,verbose,progress % compile_commands, stat(j))
129
130
call progress% completed_status(j,stat(j))
130
131
end if
131
132
@@ -300,10 +301,11 @@ end subroutine schedule_targets
300
301
! >
301
302
! > If successful, also caches the source file digest to disk.
302
303
! >
303
- subroutine build_target (model ,target ,verbose ,stat )
304
+ subroutine build_target (model ,target ,verbose ,table , stat )
304
305
type (fpm_model_t), intent (in ) :: model
305
306
type (build_target_t), intent (in ), target :: target
306
307
logical , intent (in ) :: verbose
308
+ type (compile_command_table_t), intent (inout ) :: table
307
309
integer , intent (out ) :: stat
308
310
309
311
integer :: fh
@@ -318,15 +320,15 @@ subroutine build_target(model,target,verbose,stat)
318
320
319
321
case (FPM_TARGET_OBJECT)
320
322
call model% compiler% compile_fortran(target % source% file_name, target % output_file, &
321
- & target % compile_flags, target % output_log_file, stat)
323
+ & target % compile_flags, target % output_log_file, stat, table )
322
324
323
325
case (FPM_TARGET_C_OBJECT)
324
326
call model% compiler% compile_c(target % source% file_name, target % output_file, &
325
- & target % compile_flags, target % output_log_file, stat)
327
+ & target % compile_flags, target % output_log_file, stat, table )
326
328
327
329
case (FPM_TARGET_CPP_OBJECT)
328
330
call model% compiler% compile_cpp(target % source% file_name, target % output_file, &
329
- & target % compile_flags, target % output_log_file, stat)
331
+ & target % compile_flags, target % output_log_file, stat, table )
330
332
331
333
case (FPM_TARGET_EXECUTABLE)
332
334
call model% compiler% link(target % output_file, &
0 commit comments