fpm_manifest_package Module

Define the package data containing the meta data from the configuration file.

The package data defines a Fortran type corresponding to the respective TOML document, after creating it from a package file no more interaction with the TOML document is required.

Every configuration type provides it custom constructor (prefixed with new_) and knows how to deserialize itself from a TOML document. To ensure we find no untracked content in the package file all keywords are checked and possible entries have to be explicitly allowed in the check function. If entries are mutally exclusive or interdependent inside the current table the check function is required to enforce this schema on the data structure.

The package file root allows the following keywords

name = "string"
version = "string"
license = "string"
author = "string"
maintainer = "string"
copyright = "string"
[[ executable ]]
[[ example ]]
[[ test ]]


Derived Types

type, public ::  package_config_t

Package meta data


Type Visibility Attributes Name Initial
type(build_config_t), public :: build

Build configuration data

type(dependency_config_t), public, allocatable :: dependency(:)

Dependency meta data

type(dependency_config_t), public, allocatable :: dev_dependency(:)

Development dependency meta data

type(example_config_t), public, allocatable :: example(:)

Example meta data

type(executable_config_t), public, allocatable :: executable(:)

Executable meta data

type(fortran_config_t), public :: fortran

Fortran meta data

type(install_config_t), public :: install

Installation configuration data

type(library_config_t), public, allocatable :: library

Library meta data

character(len=:), public, allocatable :: license

License meta data

type(metapackage_config_t), public :: meta

Metapackage data

character(len=:), public, allocatable :: name

Name of the package

type(preprocess_config_t), public, allocatable :: preprocess(:)

Preprocess meta data

type(profile_config_t), public, allocatable :: profiles(:)

Profiles meta data

type(test_config_t), public, allocatable :: test(:)

Test meta data

type(version_t), public :: version

Package version

Type-Bound Procedures

procedure , public , :: info Subroutine

Print information on this instance


public subroutine new_package(self, table, root, error)

Construct a new package configuration from a TOML data structure


Type IntentOptional Attributes Name
type(package_config_t), intent(out) :: self

Instance of the package configuration

type(toml_table), intent(inout) :: table

Instance of the TOML data structure

character(len=*), intent(in), optional :: root

Root directory of the manifest

type(error_t), intent(out), allocatable :: error

Error handling