# Why should I use CMake?

**URL:** https://fortran-lang.discourse.group/t/why-should-i-use-cmake/953
**Category:** Help
**Created:** [April 5, 2021, 9:40am UTC](https://fortran-lang.discourse.group/t/why-should-i-use-cmake/953 "2021-04-05T09:40:54Z")
**Posts on this page:** 1
**Showing post:** 32

<div class="post-metadata">

### Author: ![lkedward](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/lkedward/32/72_2.png) [@lkedward](https://fortran-lang.discourse.group/u/lkedward)
#### Post date: [April 17, 2021, 10:39am UTC](https://fortran-lang.discourse.group/t/why-should-i-use-cmake/953/32 "2021-04-17T10:39:35Z")

</div>

To follow up on fpm and MPI, with [fpm/#438](https://github.com/fortran-lang/fpm/pull/438) merged, it is now possible to compile fortran MPI projects in fpm if you’re using the Intel mpi compiler wrapper (`mpiifort`).

**1) Add the following to your `fpm.toml` file:**

```auto
[build]
external-modules = "mpi" # (if using)

```

**2) Compile with:**

```bash
$ fpm build --compiler mpiifort

```

**3) Run with:**

```bash
$ fpm run [NAME] --compiler mpiifort --runner mpirun

```

This only works for `mpiifort` by virtue of the existing compiler detection logic, but MPI support in fpm isn’t _official_ in that fpm currently remains ignorant of the fact you are compiling MPI (see [fpm/#354](https://github.com/fortran-lang/fpm/issues/354)).

---

_[View the full topic](https://fortran-lang.discourse.group/t/why-should-i-use-cmake/953)._
