# OpenMP option for Cray is -fopenmp

**URL:** https://discourse.cmake.org/t/openmp-option-for-cray-is-fopenmp/8540
**Category:** Development
**Created:** [July 18, 2023, 12:33pm UTC](https://discourse.cmake.org/t/openmp-option-for-cray-is-fopenmp/8540 "2023-07-18T12:33:06Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![alainm](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/a/35a633/32.png) [@alainm](https://discourse.cmake.org/u/alainm)
#### Post date: [July 18, 2023, 12:33pm UTC](https://discourse.cmake.org/t/openmp-option-for-cray-is-fopenmp/8540/1 "2023-07-18T12:33:06Z")

</div>

Cray is a clang based compiler (at least for C C++). It uses -fopenmp to enable OpenMP.

Yet, FindOpenMP.cmake 3.27 mention:

```auto
    # Cray compiler activate OpenMP with -h omp, which is enabled by default.                                                                                                                
    set(OMP_FLAG_Cray " " "-h omp")

```

Thx

---

<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: [July 18, 2023, 2:40pm UTC](https://discourse.cmake.org/t/openmp-option-for-cray-is-fopenmp/8540/2 "2023-07-18T14:40:19Z")

</div>

The newer Cray compiler is Clang-based, but the older one is not. `FindOpenMP` needs to learn this distinction. Can you please [file an issue](https://gitlab.kitware.com/cmake/cmake/-/issues) about this and include compiler details (version info, etc.).

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [July 18, 2023, 3:38pm UTC](https://discourse.cmake.org/t/openmp-option-for-cray-is-fopenmp/8540/3 "2023-07-18T15:38:25Z")

</div>

I see [CMake Issue 25100](https://gitlab.kitware.com/cmake/cmake/-/issues/25100) for this, thanks.
