Build progress object
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=:), | public, | allocatable | :: | build_dir | Build directory | ||
| type(compile_command_table_t), | public | :: | compile_commands | The compile_commands.json table | |||
| type(console_t), | public | :: | console | Console object for updating console lines | |||
| integer, | public | :: | n_complete | Number of completed targets | |||
| integer, | public | :: | n_target | Total number of targets scheduled | |||
| integer, | public, | allocatable | :: | output_lines(:) | Store needed when updating previous console lines | ||
| logical, | public | :: | plain_mode | = | .true. | ‘Plain’ output (no colors or updating) | |
| type(build_target_ptr), | public, | pointer | :: | target_queue(:) | Queue of scheduled build targets | 
Constructor for build_progress_t
Initialise a new build progress object
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(build_target_ptr), | intent(in), | target | :: | target_queue(:) | The queue of scheduled targets | |
| logical, | intent(in), | optional | :: | plain_mode | Enable ‘plain’ output for progress object | |
| character(len=*), | intent(in), | optional | :: | build_dir | Build directory | 
Progress object to initialise
Output ‘compiling’ status for build target
Output ‘compiling’ status for build target and overall percentage progress
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(build_progress_t), | intent(inout) | :: | progress | Progress object | ||
| integer, | intent(in) | :: | queue_index | Index of build target in the target queue | 
Output ‘complete’ status for build target
Output ‘complete’ status for build target and update overall percentage progress
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(build_progress_t), | intent(inout) | :: | progress | Progress object | ||
| integer, | intent(in) | :: | queue_index | Index of build target in the target queue | ||
| integer, | intent(in) | :: | build_stat | Build status flag | 
Output ‘compile_commands.json’ to build/ folder
Write compile commands table
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(build_progress_t), | intent(inout) | :: | progress | |||
| type(error_t), | allocatable | :: | error | 
Output finished status for whole package
Output finished status for whole package
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(build_progress_t), | intent(inout) | :: | progress | 
type build_progress_t !> Console object for updating console lines type(console_t) :: console !> Number of completed targets integer :: n_complete !> Total number of targets scheduled integer :: n_target !> 'Plain' output (no colors or updating) logical :: plain_mode = .true. !> Store needed when updating previous console lines integer, allocatable :: output_lines(:) !> Build directory character(:), allocatable :: build_dir !> Queue of scheduled build targets type(build_target_ptr), pointer :: target_queue(:) !> The compile_commands.json table type(compile_command_table_t) :: compile_commands contains !> Output 'compiling' status for build target procedure :: compiling_status => output_status_compiling !> Output 'complete' status for build target procedure :: completed_status => output_status_complete !> Output finished status for whole package procedure :: success => output_progress_success !> Output 'compile_commands.json' to build/ folder procedure :: dump_commands => output_write_compile_commands end type build_progress_t