Fpm version 0.13.0 released

The Fortran Package Manager (FPM) v0.13.0 is a major release introducing features and profiles, a new build customization system for conditional compilation, compiler-specific settings, and platform-dependent behavior. This release also includes CPP preprocessor source parsing, expanded Flang compiler support, multiple simultaneous library targets, and many bug fixes and improvements.

Highlights

🧩 Features and profiles

fpm now supports features and profiles, a powerful new build customization system. Features are configurable collections of package properties that can be conditionally enabled based on compiler, operating system, or user selection. Profiles are named collections of features activated via the --profile CLI flag.

[features]
debug.flags = "-g -Wall"
debug.gfortran.flags = "-fcheck=bounds"
release.flags = "-O3"
release.gfortran.flags = "-march=native"

[profiles]
debug = ["debug"]
release = ["release"]
❯ fpm build --profile release

Features support platform-specific settings, dependency configuration, preprocessor macros, and more. See the features and profiles reference for full details.

  • feat: add features and profiles support to fpm manifest by @perazz in #1177

  • feat: full support for features and profiles by @perazz in #1181

🔍 CPP preprocessor source parsing

fpm now evaluates CPP preprocessor directives (#ifdef, #ifndef, #if defined(), #if MACRO == VALUE, #elif, #else) against manifest-defined macros during source parsing. This allows fpm to correctly resolve module dependencies based on your build configuration, without requiring a separate preprocessing step.

[preprocess.cpp]
macros = ["USE_MPI"]
#ifdef USE_MPI
  use mpi_f08
#endif
  • feat: CPP preprocessor macros: simple file parsing by @perazz in #1179

  • feat: improved macro parsing by @perazz in #1218

🛠️ Flang compiler support

LLVM Flang (flang-new) is now a first-class compiler in fpm, with proper flag defaults and compiler identification. The flang command is now interpreted as LLVM Flang, and AMD’s amdflang has been added as a supported compiler.

📦 Multiple library targets

Projects can now build multiple library types simultaneously by specifying an array of types in the manifest:

[library]
type = ["shared", "static"]
  • feat: multiple simultaneous library targets by @perazz in #1168

🔗 Dependency metapackage propagation

Metapackage dependencies (such as OpenMP, MPI, BLAS) are now correctly propagated through the dependency tree, ensuring that packages depending on libraries that use metapackages are built with the correct flags and link settings.

  • feat: propagate dependency metapackages by @perazz in #1220

Further fixes and improvements

Changelog (selected)

Full changelog: GitHub comparison view

New contributors

We welcome the following new contributors:

  • @MilanSkocic (Milan Skocic), who contributed -fPIC fixes for C sources.

  • @SamueleGiuli (Samuele Giuli), who fixed a memory deallocation issue in metapackages.

  • @JorgeG94 (Jorge Galvez Vallejo), who added amdflang compiler support.

Feedback and discussion

Join the conversation and share your feedback on the Fortran Discourse thread.