# FPM version 0.13.0 released

**URL:** <https://fortran-lang.discourse.group/t/fpm-version-0-13-0-released/10728>\
**Category:** Announcements\
**Created:** [February 17, 2026, 5:42pm UTC](https://fortran-lang.discourse.group/t/fpm-version-0-13-0-released/10728 "2026-02-17T17:42:39Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![FedericoPerini](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/federicoperini/32/1750_2.png) [@FedericoPerini](https://fortran-lang.discourse.group/u/FedericoPerini)\
**Post date:** [February 17, 2026, 5:42pm UTC](https://fortran-lang.discourse.group/t/fpm-version-0-13-0-released/10728/1 "2026-02-17T17:42:39Z")

</div>

## FPM v0.13.0: Features, Profiles, and CPP Macro Parsing

Happy to announce the release of the [Fortran Package Manager `v0.13.0`](https://github.com/fortran-lang/fpm/releases/tag/v0.13.0)! This is a substantial release that introduces a build customization system we’ve been working toward for a long time: **features and profiles**.

### 🧩 Features and profiles

`fpm` now supports [features and profiles](https://fpm.fortran-lang.org/spec/features.html), a system for conditional compilation, compiler-specific settings, and platform-dependent behavior – all from your `fpm.toml` manifest. This has been one of the most requested capabilities in the project, and getting the design right took considerable effort across several PRs ([#1177](https://github.com/fortran-lang/fpm/pull/1177), [#1181](https://github.com/fortran-lang/fpm/pull/1181), [#1243](https://github.com/fortran-lang/fpm/pull/1243), [#1244](https://github.com/fortran-lang/fpm/pull/1244)).

**Features** are configurable collections of package properties – flags, dependencies, preprocessor macros, library settings – that can be selectively enabled based on compiler, OS, or user choice. **Profiles** are named bundles of features, activated via the `--profile` CLI flag:

```toml
[features]
debug.flags = "-g -Wall"
debug.gfortran.flags = "-fcheck=bounds"
debug.gfortran.linux.flags = "-fsanitize=address"
release.flags = "-O3"
release.gfortran.flags = "-march=native"
mpi.dependencies.mpi = "*"
openmp.dependencies.openmp = "*"

[profiles]
debug = ["debug"]
release = ["release"]
parallel = ["release", "mpi", "openmp"]

```

```auto
fpm build --profile parallel
fpm test --profile debug
fpm build --features release,openmp

```

The system supports platform-specific resolution (compiler + OS selectors can be combined in any order), a `default` profile for baseline settings that are always applied, and the ability to request specific features or profiles from dependencies:

```toml
[dependencies]
my-lib = { git = "https://github.com/user/my-lib", profile = "parallel-mpi" }

```

The full specification is available in the [features and profiles reference](https://fpm.fortran-lang.org/spec/features.html).

### 🔍 CPP preprocessor source parsing

A long-standing pain point has been `fpm`’s inability to correctly resolve module dependencies when `use` statements sit behind CPP conditionals. v0.13.0 addresses this: fpm now evaluates `#ifdef`, `#ifndef`, `#if defined()`, `#if MACRO == VALUE`, `#elif`, and `#else` directives against manifest-defined macros during source parsing. This means your dependency graph is resolved accurately based on your actual build configuration, without needing a separate preprocessing step.

```toml
[preprocess.cpp]
macros = ["USE_MPI"]

```

```fortran
#ifdef USE_MPI
  use mpi_f08
#endif

```

Built up incrementally over several rounds ([#1179](https://github.com/fortran-lang/fpm/pull/1179), [#1218](https://github.com/fortran-lang/fpm/pull/1218), [#1232](https://github.com/fortran-lang/fpm/pull/1232)), we now cover the full range of CPP conditional syntax including boolean evaluation, case sensitivity, and `NAME=VALUE` comparisons. This is particularly important when different combination of features/profiles are employed, as `use`d modules from different packages can now safeguarded within pre-processor macro blocks.

### 📦 Other highlights

- **Multiple simultaneous library targets** – build both shared and static libraries with `type = ["shared", "static"]` ([#1168](https://github.com/fortran-lang/fpm/pull/1168))
- **Dependency metapackage propagation** – metapackages like OpenMP, MPI, BLAS are now correctly propagated through the dependency tree ([#1220](https://github.com/fortran-lang/fpm/pull/1220))
- **Custom build folder** via `--build-dir` ([#1173](https://github.com/fortran-lang/fpm/pull/1173))
- **Selective clean** – `fpm clean --test`, `--apps`, `--examples` ([#1171](https://github.com/fortran-lang/fpm/pull/1171))
- **Custom module install directory** ([#1170](https://github.com/fortran-lang/fpm/pull/1170))
- **macOS `@rpath` standardization** for dynamic libraries ([#1146](https://github.com/fortran-lang/fpm/pull/1146))
- **macOS ARM64 and Intel x86\_64** release artifacts now included ([#1227](https://github.com/fortran-lang/fpm/pull/1227))
- **gcc-15 compatibility** fixes (thanks @krystophny in [#1150](https://github.com/fortran-lang/fpm/pull/1150))
- **FlexiBLAS** added to the BLAS metapackage (thanks @grisuthedragon in [#1241](https://github.com/fortran-lang/fpm/pull/1241))
- Source parsing performance optimizations ([#1221](https://github.com/fortran-lang/fpm/pull/1221))
- **Expanded compiler support**. LLVM Flang (`flang-new`) and AMD’s `amdflang` are now first-class citizens in `fpm`, thanks to @rouson and @jorgeg who contributed patches ([#1174](https://github.com/fortran-lang/fpm/pull/1174), [#1196](https://github.com/fortran-lang/fpm/pull/1196), [#1176](https://github.com/fortran-lang/fpm/pull/1176)).

### 👋 New contributors

Welcome new contributors: @Albkat, @SamueleGiuli, @jorgeg, @mskocic, @jinangshah21, and @grisuthedragon. Thank you for your contributions!

### ⬇ Get it

Download from the [GitHub release page](https://github.com/fortran-lang/fpm/releases/tag/v0.13.0), or install via [fortran-lang/setup-fpm](https://github.com/fortran-lang/setup-fpm) in CI. The full changelog is available in the [comparison view](https://github.com/fortran-lang/fpm/compare/v0.12.0...v0.13.0).

As always, feedback, bug reports, and contributions are welcome. Let us know how features and profiles work for your projects!

---

<div class="post-metadata">

**Author:** ![jacobwilliams](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/jacobwilliams/32/10_2.png) [@jacobwilliams](https://fortran-lang.discourse.group/u/jacobwilliams)\
**Post date:** [March 8, 2026, 11:14pm UTC](https://fortran-lang.discourse.group/t/fpm-version-0-13-0-released/10728/2 "2026-03-08T23:14:53Z")

</div>

Is the `fortran-lang/setup-fpm@v7` GitHub Action getting 0.13.0? It doesn’t seem to be for me.

 ![image](https://global.discourse-cdn.com/free1/uploads/fortran_lang/original/2X/3/3247e8d38d7acf5b05eaef8f4bd325664543e778.png)

---

<div class="post-metadata">

**Author:** ![jacobwilliams](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/jacobwilliams/32/10_2.png) [@jacobwilliams](https://fortran-lang.discourse.group/u/jacobwilliams)\
**Post date:** [March 8, 2026, 11:19pm UTC](https://fortran-lang.discourse.group/t/fpm-version-0-13-0-released/10728/3 "2026-03-08T23:19:10Z")

</div>

Oh, I see there is a `v9` (which is getting 0.12). I guess a new update is needed to get 0.13?

---

<div class="post-metadata">

**Author:** ![FedericoPerini](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/federicoperini/32/1750_2.png) [@FedericoPerini](https://fortran-lang.discourse.group/u/FedericoPerini)\
**Post date:** [March 9, 2026, 7:14am UTC](https://fortran-lang.discourse.group/t/fpm-version-0-13-0-released/10728/4 "2026-03-09T07:14:21Z")

</div>

`fpm-version` is the variable for your action, it’s discussed at length in [GitHub - fortran-lang/setup-fpm: GitHub Action to setup the Fortran Package Manager for CI on Ubuntu, MacOS and Windows. · GitHub](https://github.com/fortran-lang/setup-fpm?tab=readme-ov-file#default-fpm-version-for-each-release)

---

<div class="post-metadata">

**Author:** ![rgaelzer](https://avatars.discourse-cdn.com/v4/letter/r/8491ac/32.png) [@rgaelzer](https://fortran-lang.discourse.group/u/rgaelzer)\
**Post date:** [March 13, 2026, 1:22am UTC](https://fortran-lang.discourse.group/t/fpm-version-0-13-0-released/10728/5 "2026-03-13T01:22:10Z")

</div>

I am starting to learn fpm, so please indulge me here.

In the GitHub page, the preferred ways to install fpm are either using conda-forge or homebrew. Both options install a containerized version of fpm in the user’s home (well, I know that conda does).

However, I prefer the old-fashioned system-wide installation (in /usr/local/bin). So I would rather manually download the tarball and compile locally. This is how I installed version 0.12 of fpm

Now I wonder if the whole task of checking the latest version in the GitHub repository, download the master file, build the latest version locally and installing it system-wide can be performed with the previously-existing version?

Or do I need to write a bash script to accomplish all these steps?

Thanks.

---

<div class="post-metadata">

**Author:** ![certik](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/certik/32/4_2.png) [@certik](https://fortran-lang.discourse.group/u/certik)\
**Post date:** [March 13, 2026, 4:37am UTC](https://fortran-lang.discourse.group/t/fpm-version-0-13-0-released/10728/6 "2026-03-13T04:37:09Z")

</div>

> [@rgaelzer](#):
>
> build the latest version locally and installing it system-wide can be performed with the previously-existing version?

You can, but you don’t have to:

> Or do I need to write a bash script to accomplish all these steps?

The script is already included in repository. You only need a Fortran compiler to bootstrap fpm.

---

<div class="post-metadata">

**Author:** ![hkvzjal](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/hkvzjal/32/3055_2.png) [@hkvzjal](https://fortran-lang.discourse.group/u/hkvzjal)\
**Post date:** [March 13, 2026, 5:51am UTC](https://fortran-lang.discourse.group/t/fpm-version-0-13-0-released/10728/7 "2026-03-13T05:51:54Z")

</div>

> **[Installing fpm — Fortran Package Manager](https://fpm.fortran-lang.org/install/index.html#install)**
>
> This how-to guide covers the installation of the Fortran Package Manager (fpm) on various platforms.

All the installation options are documented in the link above, including the use of the installation script as @certik mentioned. If you have a system-wide python installation you can also use `pip install fpm`.

On Ubuntu I use the installation script, on windows I use winget.

---

<div class="post-metadata">

**Author:** ![FedericoPerini](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/federicoperini/32/1750_2.png) [@FedericoPerini](https://fortran-lang.discourse.group/u/FedericoPerini)\
**Post date:** [March 13, 2026, 7:04am UTC](https://fortran-lang.discourse.group/t/fpm-version-0-13-0-released/10728/8 "2026-03-13T07:04:35Z")

</div>

> [@rgaelzer](#):
>
> build the latest version locally and installing it system-wide can be performed with the previously-existing version?

All you have to do to manually install fpm (Unix/macOS) is run the [`install.sh`](https://github.com/fortran-lang/fpm/blob/main/install.sh) script in the repository root: it will automatically download a “safe” previously existing version (0.8.0) and it will use that to build and install the most recent one.

You only have to ensure is that either `curl` or `wget` is installed in your system.

---

<div class="post-metadata">

**Author:** ![moriglia](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@moriglia](https://fortran-lang.discourse.group/u/moriglia)\
**Post date:** [March 30, 2026, 8:10am UTC](https://fortran-lang.discourse.group/t/fpm-version-0-13-0-released/10728/10 "2026-03-30T08:10:32Z")

</div>

Guix-science channel updated:

> **[fortran: update fortran-fpm to version v0.13.0](https://codeberg.org/guix-science/guix-science/pulls/644)**
>
> The fortran-fpm package points to version v0.13.0.
> The new fortran-fpm-0.12 package contains the previous version.
