# Extra Fortran\_FLAGS in \`flags.make\` with arm64: Should I have them?

**URL:** https://discourse.cmake.org/t/extra-fortran-flags-in-flags-make-with-arm64-should-i-have-them/5772
**Category:** Usage
**Created:** [June 1, 2022, 3:54pm UTC](https://discourse.cmake.org/t/extra-fortran-flags-in-flags-make-with-arm64-should-i-have-them/5772 "2022-06-01T15:54:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mathomp4](https://discourse.cmake.org/user_avatar/discourse.cmake.org/mathomp4/32/176_2.png) [@mathomp4](https://discourse.cmake.org/u/mathomp4)
#### Post date: [June 1, 2022, 3:54pm UTC](https://discourse.cmake.org/t/extra-fortran-flags-in-flags-make-with-arm64-should-i-have-them/5772/1 "2022-06-01T15:54:22Z")

</div>

I’ve recently been [experimenting with getting a climate model I work on working on M1 Mac](https://github.com/GEOS-ESM/GEOSgcm/issues/417). Thanks to the GCC folks, I got it to run! However, one thing I noticed as I was experimenting is that when I build on my M1 Mac, at the end of the `flags.make` (for one file/target I randomly picked):

```cmake
Fortran_FLAGSarm64 = -O2 -march=armv8-a ...

Fortran_FLAGS = -O2 -march=armv8-a ...

```

where the two lines seem to be identical.

But, on my Intel Mac, in `flags.make` I only see a `Fortran_FLAGS` line. No “`Fortran_FLAGSx86_64`” or whatever the relevant arch would be.

Is this expected with CMake+Make on M1? I’ve been staring at the CMake in my model and I don’t think _I_ ever define any sort of flag variable that is suffixed with `arm64` or the machine arch.

---

<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: [June 1, 2022, 4:57pm UTC](https://discourse.cmake.org/t/extra-fortran-flags-in-flags-make-with-arm64-should-i-have-them/5772/2 "2022-06-01T16:57:20Z")

</div>

It seems that this comes from a loop which sets a `<LANG>_FLAGS<ARCH>` variable in the makefiles per arch present in the target’s `OSX_ARCHITECTURES` property (with per-config variants). If unset, it uses an internal variable for the arches. I don’t think there’s much to worry about.

---

<div class="post-metadata">

### Author: ![mathomp4](https://discourse.cmake.org/user_avatar/discourse.cmake.org/mathomp4/32/176_2.png) [@mathomp4](https://discourse.cmake.org/u/mathomp4)
#### Post date: [June 1, 2022, 10:17pm UTC](https://discourse.cmake.org/t/extra-fortran-flags-in-flags-make-with-arm64-should-i-have-them/5772/3 "2022-06-01T22:17:01Z")

</div>

@ben.boeckel Thanks! I figured it wasn’t too crucial, just wanted to make sure there wasn’t a weird extra set of flags I should be setting!
