compile_commands.json tableAdd compile commands to array (gcc-15 bug workaround)
Add one compile command to array with a loop (gcc-15 bug on array initializer)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(compile_command_t), | intent(inout), | allocatable | :: | list(:) | ||
| type(compile_command_t), | intent(in) | :: | new |
Add multiple compile commands to array with a loop (gcc-15 bug on array initializer)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(compile_command_t), | intent(inout), | allocatable | :: | list(:) | ||
| type(compile_command_t), | intent(in) | :: | new(:) |
Override default initializer (GCC 15 bug)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | directory | |||
| character(len=*), | intent(in), | optional | :: | arguments(:) | ||
| character(len=*), | intent(in) | :: | file |
Definition of a build command
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(string_t), | public, | allocatable | :: | arguments(:) | |||
| type(string_t), | public | :: | directory | ||||
| type(string_t), | public | :: | file |
| public function cct_new (directory, arguments, file) | Override default initializer (GCC 15 bug) |
| procedure, public :: destroy => compile_command_destroy | Operation |
| generic, public :: dump => dump_to_toml, dump_to_file, dump_to_unit | |
| procedure, public :: dump_to_toml => compile_command_dump_toml | |
| generic, public :: load => load_from_toml, load_from_file, load_from_unit | |
| procedure, public :: load_from_toml => compile_command_load_toml | |
| generic, public :: operator(==) => serializable_is_same | |
| procedure, public :: serializable_is_same => compile_command_is_same | Serialization interface |
| procedure, public, non_overridable :: test_serialization | Test load/write roundtrip |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(compile_command_t), | public, | allocatable | :: | command(:) |
| procedure, public :: destroy => cct_destroy | Operation |
| generic, public :: dump => dump_to_toml, dump_to_file, dump_to_unit | |
| procedure, public :: dump_to_toml => cct_dump_toml | |
| generic, public :: load => load_from_toml, load_from_file, load_from_unit | |
| procedure, public :: load_from_toml => cct_load_toml | |
| generic, public :: operator(==) => serializable_is_same | |
| generic, public :: register => cct_register, cct_register_object | |
| procedure, public :: serializable_is_same => cct_is_same | Serialization interface |
| procedure, public, non_overridable :: test_serialization | Test load/write roundtrip |
| procedure, public :: write => cct_write |
Check that two compile_command_table_t objects are equal All checks passed!
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(compile_command_table_t), | intent(in) | :: | this | |||
| class(serializable_t), | intent(in) | :: | that |
Override default initializer (GCC 15 bug)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | directory | |||
| character(len=*), | intent(in), | optional | :: | arguments(:) | ||
| character(len=*), | intent(in) | :: | file |
Check that two compile_command_t objects are equal All checks passed!
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(compile_command_t), | intent(in) | :: | this | |||
| class(serializable_t), | intent(in) | :: | that |
Add multiple compile commands to array with a loop (gcc-15 bug on array initializer)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(compile_command_t), | intent(inout), | allocatable | :: | list(:) | ||
| type(compile_command_t), | intent(in) | :: | new(:) |
Add one compile command to array with a loop (gcc-15 bug on array initializer)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(compile_command_t), | intent(inout), | allocatable | :: | list(:) | ||
| type(compile_command_t), | intent(in) | :: | new |
Cleanup a compile command table
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(compile_command_table_t), | intent(inout) | :: | self |
Instance of the serializable object |
Dump compile_command_table_t to a toml array
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(compile_command_table_t), | intent(inout) | :: | self |
Instance of the serializable object |
||
| type(toml_array), | intent(inout) | :: | array |
Data structure |
||
| type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
Dump compile_command_table_t to toml table
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(compile_command_table_t), | intent(inout) | :: | self |
Instance of the serializable object |
||
| type(toml_table), | intent(inout) | :: | table |
Data structure |
||
| type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
Read compile_command_table_t from toml table (no checks made at this stage)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(compile_command_table_t), | intent(inout) | :: | self |
Instance of the serializable object |
||
| type(toml_table), | intent(inout) | :: | table |
Data structure |
||
| type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
Register a new compile command
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(compile_command_table_t), | intent(inout) | :: | self |
Instance of the serializable object |
||
| character(len=*), | intent(in) | :: | command |
Data structure |
||
| integer, | intent(in) | :: | target_os |
The target OS of the compile_commands.json (may be cross-compiling) |
||
| type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(compile_command_table_t), | intent(inout) | :: | self |
Instance of the serializable object |
||
| type(compile_command_t), | intent(in) | :: | command |
Data structure |
||
| type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
Write compile_commands.json file. Because Jonquil does not support non-named arrays, create a custom json here.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(compile_command_table_t), | intent(inout) | :: | self |
Instance of the serializable object |
||
| character(len=*), | intent(in) | :: | filename |
The file name |
||
| type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
Cleanup compile command
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(compile_command_t), | intent(inout) | :: | self |
Instance of the serializable object |
Dump compile_command_t to toml table
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(compile_command_t), | intent(inout) | :: | self |
Instance of the serializable object |
||
| type(toml_table), | intent(inout) | :: | table |
Data structure |
||
| type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
Read compile_command_t from toml table (no checks made at this stage)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(compile_command_t), | intent(inout) | :: | self |
Instance of the serializable object |
||
| type(toml_table), | intent(inout) | :: | table |
Data structure |
||
| type(error_t), | intent(out), | allocatable | :: | error |
Error handling |