# option compilation not added with Intel fortran compiler + msvc

**URL:** https://discourse.cmake.org/t/option-compilation-not-added-with-intel-fortran-compiler-msvc/2738
**Category:** Usage
**Created:** [February 11, 2021, 10:26am UTC](https://discourse.cmake.org/t/option-compilation-not-added-with-intel-fortran-compiler-msvc/2738 "2021-02-11T10:26:07Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![grimgort](https://discourse.cmake.org/user_avatar/discourse.cmake.org/grimgort/32/1002_2.png) [@grimgort](https://discourse.cmake.org/u/grimgort)
#### Post date: [February 11, 2021, 10:26am UTC](https://discourse.cmake.org/t/option-compilation-not-added-with-intel-fortran-compiler-msvc/2738/1 "2021-02-11T10:26:07Z")

</div>

Hello,

I have a big problem to add compilation options with the compiler intel fortran +msvc .  
When I add compilation options, they are not taken into account in visual studio (see picture). A certain number of options are put in “additional Option”.

[2021-02-11 11\_18\_53-Matisse - Microsoft Visual Studio|690x250](https://discourse.cmake.org/uploads/short-url/zvwmCPpbAf7BvcxzqNzWImTDbhj.png)

in my code, I wrote :

```
    list(APPEND f_compile_flags /names:lowercase /iface:cref /assume:underscore /libs:static /INCREMENTAL:NO /assume:byterecl /Qinit:zero /MT)
target_compile_options(ck_io_fortran PRIVATE ${f_compile_flags})

```

We can notice that /iface:cref is taken into account but not the other options. What is my error?

---

<div class="post-metadata">

### Author: ![Angew](https://discourse.cmake.org/user_avatar/discourse.cmake.org/angew/32/229_2.png) [@Angew](https://discourse.cmake.org/u/Angew)
#### Post date: [February 11, 2021, 12:41pm UTC](https://discourse.cmake.org/t/option-compilation-not-added-with-intel-fortran-compiler-msvc/2738/2 "2021-02-11T12:41:37Z")

</div>

Is there a problem with the options not actually applying, or just not being in the proper place in the IDE? I mean, if you run the build, are the options in effect?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [February 11, 2021, 1:31pm UTC](https://discourse.cmake.org/t/option-compilation-not-added-with-intel-fortran-compiler-msvc/2738/3 "2021-02-11T13:31:15Z")

</div>

CMake’s Visual Studio support translates some flags into dedicated options in the project files. Though I don’t know the specifics, there is the `Templates/FlagTables` directory in CMake’s source tree. Not seeing anything to do with Fortran though 😕 .

Cc: @brad.king

---

<div class="post-metadata">

### Author: ![grimgort](https://discourse.cmake.org/user_avatar/discourse.cmake.org/grimgort/32/1002_2.png) [@grimgort](https://discourse.cmake.org/u/grimgort)
#### Post date: [February 12, 2021, 9:34am UTC](https://discourse.cmake.org/t/option-compilation-not-added-with-intel-fortran-compiler-msvc/2738/4 "2021-02-12T09:34:45Z")

</div>

I think the compilation options are well taken into account (is there a way to see the command line being executed?).

I corrected my list by removing the link flags, but it doesn’t change anything. The problem remains the same.  
` list(APPEND f_compile_flags /names:lowercase /iface:cref /assume:underscore /libs:static /assume:byterecl /Qinit:zero )`

the script [https://pypi.org/project/cmake-converter/](https://pypi.org/project/cmake-converter/) converts intel fortran flags to -libs:static. what is the correct syntax between /libs:static and -libs:static? (I tried both but the problem remains the same)

---

<div class="post-metadata">

### Author: ![Angew](https://discourse.cmake.org/user_avatar/discourse.cmake.org/angew/32/229_2.png) [@Angew](https://discourse.cmake.org/u/Angew)
#### Post date: [February 12, 2021, 10:08am UTC](https://discourse.cmake.org/t/option-compilation-not-added-with-intel-fortran-compiler-msvc/2738/5 "2021-02-12T10:08:15Z")

</div>

IFort’s default option prefix format is `/` on Windows and `-` on Unix, but at least the Windows versions understands both, so it shouldn’t really matter if you use `-libs` or `/libs`.

If the options are in effect (as you say), then do you really need them to be in the correct boxes in the `vfproj`? I understand it would look better, but it’s purely cosmetic: changing them with lasting effect needs to happen in the CMakeLists anyway.
