This is the main documentation of the Fortran package manager (fpm). This document serves as developer documentation of fpm itself and contains general advice for developing in the fpm code base.
The central object describing an fpm project is the package manifest
The manifest is written in TOML, you can find the TOML specification at the official TOML homepage.
fpm.toml file targets project developers and maintainers to relieve them from writing build files for their packages.
With the package manifest a central place to collect information about the project is provided.
It contains the versioning and licensing meta data, as well as the information on external dependencies and the required build-tools or compiler settings.
The manifest format specific to fpm projects is documented in the manifest reference.
For a more practical but less complete guide on creating fpm projects see the packaging guide.
All the manifest types are bundled in fpm_manifest.
While the specific subtables for the package configuration are found in the
src/fpm/manifest directory, they should be reexported in the fpm_manifest module if they should be elsewhere in fpm.
fpm is mainly used as a command line tool. To work with an fpm project as a user you can completely rely on the command line.
Once front-end inputs have been received from the package manifest and command line interface, fpm will construct an internal representation of the package and its dependencies. This internal representation is known as the package model. The model and its associated data types should encapsulate all the information required to correctly build a package and should be independent of the intended backend build system. Information stored in the model includes: build targets and their inter-dependencies; compiler and compiler flags; library linking information.
For more information on the contents of the package model and the process for constructing it, please see fpm_model.
Once a complete package model has been constructed, it can be passed to a backend for either performing the compilation and linking of targets, or for generating configuration files for a third-party build system. Currently, only a native backend is implemented in fpm. See fpm_backend for more information.
To regenerate this documentation run: