fpm_model Module

The fpm package model

Defines the fpm model data types which encapsulate all information required to correctly build a package and its dependencies.

The process (see build_model) for generating a valid fpm_model involves source files discovery (fpm_sources) and parsing (fpm_source_parsing).

Once a valid fpm_model has been constructed, it may be passed to targets_from_sources to generate a list of build targets for the backend.

Enumerations

Source type: FPM_UNIT_* Describes the type of source file — determines build target generation

Source scope: FPM_SCOPE_* Describes the scoping rules for using modules — controls module dependency resolution



Contents


Variables

TypeVisibility AttributesNameInitial
integer, public, parameter:: FPM_SCOPE_APP =3

Module-use scope is library/dependency and app modules

integer, public, parameter:: FPM_SCOPE_DEP =2

Module-use scope is library/dependency modules only

integer, public, parameter:: FPM_SCOPE_EXAMPLE =5
integer, public, parameter:: FPM_SCOPE_LIB =1

Module-use scope is library/dependency modules only

integer, public, parameter:: FPM_SCOPE_TEST =4

Module-use scope is library/dependency and test modules

integer, public, parameter:: FPM_SCOPE_UNKNOWN =-1

Source has no module-use scope

integer, public, parameter:: FPM_UNIT_CHEADER =6

Source type is c header file

integer, public, parameter:: FPM_UNIT_CSOURCE =5

Source type is c source file

integer, public, parameter:: FPM_UNIT_MODULE =2

Source type is fortran module

integer, public, parameter:: FPM_UNIT_PROGRAM =1

Source type is fortran program

integer, public, parameter:: FPM_UNIT_SUBMODULE =3

Source type is fortran submodule

integer, public, parameter:: FPM_UNIT_SUBPROGRAM =4

Source type is fortran subprogram

integer, public, parameter:: FPM_UNIT_UNKNOWN =-1

Source type unknown


Derived Types

type, public :: fpm_model_t

Type describing everything required to build the root package and its dependencies.

type, public :: srcfile_t

Type for describing a source file


Subroutines

public subroutine show_model(model)

Arguments

Type IntentOptional AttributesName
type(fpm_model_t), intent(in) :: model