Feature configuration data
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(build_config_t), | public, | allocatable | :: | build |
Build configuration |
||
character(len=:), | public, | allocatable | :: | c_flags | |||
character(len=:), | public, | allocatable | :: | cxx_flags | |||
logical, | public | :: | default | = | .false. |
Is this feature enabled by default |
|
type(dependency_config_t), | public, | allocatable | :: | dependency(:) |
Dependencies |
||
character(len=:), | public, | allocatable | :: | description | |||
type(dependency_config_t), | public, | allocatable | :: | dev_dependency(:) |
Development dependencies |
||
type(example_config_t), | public, | allocatable | :: | example(:) |
Examples |
||
type(executable_config_t), | public, | allocatable | :: | executable(:) |
Executable configurations |
||
character(len=:), | public, | allocatable | :: | flags |
Compiler flags |
||
type(fortran_config_t), | public, | allocatable | :: | fortran |
Fortran configuration |
||
type(install_config_t), | public, | allocatable | :: | install |
Installation configuration |
||
type(library_config_t), | public, | allocatable | :: | library |
Library configuration |
||
character(len=:), | public, | allocatable | :: | link_time_flags | |||
type(metapackage_config_t), | public | :: | meta |
Metapackage data |
|||
character(len=:), | public, | allocatable | :: | name |
Feature identity |
||
type(platform_config_t), | public | :: | platform |
Compiler/OS targeting (consistent with profile_config_t pattern) |
|||
type(preprocess_config_t), | public, | allocatable | :: | preprocess(:) |
Preprocessor configuration |
||
type(string_t), | public, | allocatable | :: | requires_features(:) |
Feature dependencies |
||
type(test_config_t), | public, | allocatable | :: | test(:) |
Tests |
Check validity of the TOML table
Check local schema for allowed entries
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(toml_table), | intent(inout) | :: | table |
Instance of the TOML data structure |
||
type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
Dump dependency to toml table
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(srcfile_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 |
Write serializable object to file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(serializable_t), | intent(inout) | :: | self |
Instance of the dependency tree |
||
character(len=*), | intent(in) | :: | file |
File name |
||
type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
|
logical, | intent(in), | optional | :: | json |
Optional JSON format |
Write serializable object to a formatted Fortran unit
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(serializable_t), | intent(inout) | :: | self |
Instance of the dependency tree |
||
integer, | intent(in) | :: | unit |
Formatted unit |
||
type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
|
logical, | intent(in), | optional | :: | json |
Optional JSON format requested? |
Dump feature to toml table
Because dependencies are named, fallback if this has no name
So, serialization will work regardless of size(self%dep) == self%ndep
Because dependencies are named, fallback if this has no name
So, serialization will work regardless of size(self%dep) == self%ndep
Because dependencies are named, fallback if this has no name
So, serialization will work regardless of size(self%dep) == self%ndep
Because dependencies are named, fallback if this has no name
So, serialization will work regardless of size(self%dep) == self%ndep
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(feature_config_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 |
Print information on this instance
Write information on instance
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(feature_config_t), | intent(in) | :: | self |
Instance of the feature configuration |
||
integer, | intent(in) | :: | unit |
Unit for IO |
||
integer, | intent(in), | optional | :: | verbosity |
Verbosity of the printout |
Read dependency from toml table (no checks made at this stage)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(srcfile_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 dependency tree from file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(serializable_t), | intent(inout) | :: | self |
Instance of the dependency tree |
||
character(len=*), | intent(in) | :: | file |
File name |
||
type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
|
logical, | intent(in), | optional | :: | json |
Optional JSON format |
Read dependency tree from file init JSON interpreter Read object from TOML table
use default TOML parser
Read object from TOML table
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(serializable_t), | intent(inout) | :: | self |
Instance of the dependency tree |
||
integer, | intent(in) | :: | unit |
File name |
||
type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
|
logical, | intent(in), | optional | :: | json |
Optional JSON format |
Read feature from toml table (no checks made at this stage)
Read all packages Read all packages Read all packages Read all packages Read all packages Read all packages
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(feature_config_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 |
Get manifest name
Return a name string as it would appear in the TOML manifest
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(feature_config_t), | intent(in) | :: | self |
Check that two source files are equal All checks passed!
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(srcfile_t), | intent(in) | :: | this | |||
class(serializable_t), | intent(in) | :: | that |
Serialization interface
Check that two feature configs are equal
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(feature_config_t), | intent(in) | :: | this | |||
class(serializable_t), | intent(in) | :: | that |
Test load/write roundtrip
Test serialization of a serializable object Dump to scratch file Load from scratch file Check same
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(serializable_t), | intent(inout) | :: | self | |||
character(len=*), | intent(in) | :: | message | |||
type(error_t), | intent(out), | allocatable | :: | error |
type, extends(serializable_t) :: feature_config_t !> Feature identity character(len=:), allocatable :: name character(len=:), allocatable :: description !> Compiler/OS targeting (consistent with profile_config_t pattern) type(platform_config_t) :: platform !> Build configuration type(build_config_t), allocatable :: build !> Installation configuration type(install_config_t), allocatable :: install !> Fortran configuration type(fortran_config_t), allocatable :: fortran !> Library configuration type(library_config_t), allocatable :: library !> Executable configurations type(executable_config_t), allocatable :: executable(:) !> Dependencies type(dependency_config_t), allocatable :: dependency(:) !> Development dependencies type(dependency_config_t), allocatable :: dev_dependency(:) !> Examples type(example_config_t), allocatable :: example(:) !> Tests type(test_config_t), allocatable :: test(:) !> Preprocessor configuration type(preprocess_config_t), allocatable :: preprocess(:) !> Metapackage data type(metapackage_config_t) :: meta !> Compiler flags character(len=:), allocatable :: flags character(len=:), allocatable :: c_flags character(len=:), allocatable :: cxx_flags character(len=:), allocatable :: link_time_flags !> Feature dependencies type(string_t), allocatable :: requires_features(:) !> Is this feature enabled by default logical :: default = .false. contains !> Print information on this instance procedure :: info !> Check validity of the TOML table procedure, nopass :: check !> Get manifest name procedure :: manifest_name !> Serialization interface procedure :: serializable_is_same => feature_is_same procedure :: dump_to_toml procedure :: load_from_toml end type feature_config_t