fpm_meta Module

The fpm meta-package model

This is a wrapper data type that encapsulate all pre-processing information (compiler flags, linker libraries, etc.) required to correctly enable a package to use a core library.

Available core libraries

  • OpenMP
  • MPI
  • fortran-lang stdlib
  • fortran-lang minpack

@note Note Core libraries are enabled in the [build] section of the fpm.toml manifest



Interfaces

public interface resolve_metapackages

  • private subroutine resolve_metapackage_model(model, package, settings, error)

    Resolve all metapackages into the package config

    Arguments

    Type IntentOptional Attributes Name
    type(fpm_model_t), intent(inout) :: model
    type(package_config_t), intent(inout) :: package
    class(fpm_build_settings), intent(inout) :: settings
    type(error_t), intent(out), allocatable :: error

Derived Types

type, public ::  metapackage_t

Type for describing a source file

Components

Type Visibility Attributes Name Initial
type(string_t), public :: cflags
type(string_t), public :: cxxflags
type(dependency_config_t), public, allocatable :: dependency(:)

List of Development dependency meta data. Metapackage dependencies are never exported from the model

type(string_t), public, allocatable :: external_modules(:)
type(string_t), public :: fflags
type(string_t), public :: flags

List of compiler flags and options to be added

type(fortran_features_t), public, allocatable :: fortran

Special fortran features

logical, public :: has_build_flags = .false.
logical, public :: has_c_flags = .false.
logical, public :: has_cxx_flags = .false.
logical, public :: has_dependencies = .false.
logical, public :: has_external_modules = .false.
logical, public :: has_fortran_flags = .false.
logical, public :: has_include_dirs = .false.
logical, public :: has_link_flags = .false.
logical, public :: has_link_libraries = .false.
logical, public :: has_run_command = .false.
type(string_t), public, allocatable :: incl_dirs(:)
type(string_t), public :: link_flags
type(string_t), public, allocatable :: link_libs(:)
type(string_t), public :: run_command
type(version_t), public, allocatable :: version

Package version (if supported)

Type-Bound Procedures

procedure, public :: destroy ../../

Clean metapackage structure

procedure, public :: new => init_from_name ../../

Initialize the metapackage structure from its given name

generic, public :: resolve => resolve_cmd, resolve_model, resolve_package_config

Functions

public pure function MPI_TYPE_NAME(mpilib) result(name)

Return a name for the MPI library

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: mpilib

Return Value character(len=:), allocatable