Fpm version 0.13.0 released
Conteúdo
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.
🔍 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
🛠️ 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"]
🔗 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.
Further fixes and improvements¶
Standardize macOS dynamic library paths using
@rpathby @perazz in #1146gcc-15 fixes: segfault on
fpm installand metapackages by @krystophny in #1150Fix
-fPICfor C sources by @MilanSkocic in #1206Remove duplicate
-fPICflags causing flang-new failure on Windows by @perazz in #1225Skip
-fPICflag for flang-new on Windows MSVC targets by @perazz in #1167Add thread safety (OpenMP critical) to command registration by @zoziha in #1143
Optimize source parsing with
insert_linesby @perazz in #1221Add macOS ARM64 and Intel x86_64 release artifacts by @perazz in #1227
Fix: deallocate in
metapackage_tdestroy by @SamueleGiuli in #1192
Changelog (selected)¶
feat: add features and profiles support to fpm manifest by @perazz in #1177
feat: full support for features and profiles by @perazz in #1181
feat: CPP preprocessor macros: simple file parsing by @perazz in #1179
feat: make flang-new a first-class citizen in fpm by @perazz in #1174
feat: multiple simultaneous library targets by @perazz in #1168
Standardize macOS dynamic library paths using
@rpathby @perazz in #1146gcc-15 fixes by @krystophny in #1150
Fix
-fPICfor C sources by @MilanSkocic in #1206Fix: deallocate in
metapackage_tdestroy by @SamueleGiuli in #1192Add thread safety (OpenMP critical) to command registration by @zoziha in #1143
Optimize source parsing with
insert_linesby @perazz in #1221Add macOS ARM64 and Intel x86_64 release artifacts by @perazz in #1227
Full changelog: GitHub comparison view
New contributors¶
We welcome the following new contributors:
@MilanSkocic (Milan Skocic), who contributed
-fPICfixes for C sources.@SamueleGiuli (Samuele Giuli), who fixed a memory deallocation issue in metapackages.
@JorgeG94 (Jorge Galvez Vallejo), who added
amdflangcompiler support.
Feedback and discussion¶
Join the conversation and share your feedback on the Fortran Discourse thread.