# Passing options for a specific compiler to fpm

**URL:** <https://fortran-lang.discourse.group/t/passing-options-for-a-specific-compiler-to-fpm/9492>\
**Category:** Help\
**Created:** [March 26, 2025, 3:15pm UTC](https://fortran-lang.discourse.group/t/passing-options-for-a-specific-compiler-to-fpm/9492 "2025-03-26T15:15:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arjen](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@Arjen](https://fortran-lang.discourse.group/u/Arjen)\
**Post date:** [March 26, 2025, 3:15pm UTC](https://fortran-lang.discourse.group/t/passing-options-for-a-specific-compiler-to-fpm/9492/1 "2025-03-26T15:15:04Z")

</div>

I have been experimenting with the FMZM library by David Smith for multiple-precision calculations with the intent to make it accessible via fpm. But for the Intel ifx compiler I need a specific compile option. Is it possible to do so? That is: can you specify in the toml file that option A is to be added if you use compiler B?

---

<div class="post-metadata">

**Author:** ![davidpfister](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/davidpfister/32/3949_2.png) [@davidpfister](https://fortran-lang.discourse.group/u/davidpfister)\
**Post date:** [March 26, 2025, 3:48pm UTC](https://fortran-lang.discourse.group/t/passing-options-for-a-specific-compiler-to-fpm/9492/2 "2025-03-26T15:48:02Z")

</div>

Unless that changed, I think you cannot. However, you can use response file. I usually have a `fpm.rsp` sitting next to the `fpm.toml` which looks like this

```bash
@clean
option clean --all

@rebuild
system rmdir /s /q build
option build --flag '-ffree-line-length-none'

@build
option build --flag '-ffree-line-length-none'

```

so you could define:

```bash
@build-intel
option --flag ' '

@build-gfortran
option --flag ' '

```

PS: if you do this in Powershell, the @ symbol is reserved so you have to do `fpm --% @build-intel`. The `--%` deactivates ‘smart’ parsing.

---

<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 26, 2025, 4:07pm UTC](https://fortran-lang.discourse.group/t/passing-options-for-a-specific-compiler-to-fpm/9492/3 "2025-03-26T16:07:22Z")

</div>

Not yet, but likely in the next release, as [it is being discussed](https://github.com/fortran-lang/fpm/issues/1096)

---

<div class="post-metadata">

**Author:** ![Arjen](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@Arjen](https://fortran-lang.discourse.group/u/Arjen)\
**Post date:** [March 27, 2025, 7:47am UTC](https://fortran-lang.discourse.group/t/passing-options-for-a-specific-compiler-to-fpm/9492/4 "2025-03-27T07:47:19Z")

</div>

Okay, thanks for this! I guess a response file is the way to go then for the moment.
