fpm_toml Module

Interface to TOML processing library

This module acts as a proxy to the toml-f public Fortran API and allows to selectively expose components from the library to fpm. The interaction with toml-f data types outside of this module should be limited to tables, arrays and key-lists, most of the necessary interactions are implemented in the building interface with the get_value and set_value procedures.

This module allows to implement features necessary for fpm, which are not yet available in upstream toml-f.

For more details on the library used see the TOML-Fortran developer pages.



Contents


Subroutines

public subroutine get_list(table, key, list, error)

Arguments

Type IntentOptional AttributesName
type(toml_table), intent(inout) :: table

Instance of the TOML data structure

character(len=*), intent(in) :: key

Key to read from

type(string_t), intent(out), allocatable:: list(:)

List of strings to read

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

Error handling

public subroutine read_package_file(table, manifest, error)

Process the configuration file to a TOML data structure

Arguments

Type IntentOptional AttributesName
type(toml_table), intent(out), allocatable:: table

TOML data structure

character(len=*), intent(in) :: manifest

Name of the package configuration file

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

Error status of the operation