# Disable OpenMP

**URL:** https://discourse.cmake.org/t/disable-openmp/2700
**Category:** Usage
**Tags:** os:linux
**Created:** [February 5, 2021, 6:58am UTC](https://discourse.cmake.org/t/disable-openmp/2700 "2021-02-05T06:58:14Z")
**Posts on this page:** 1
**Showing post:** 4

<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 5, 2021, 2:59pm UTC](https://discourse.cmake.org/t/disable-openmp/2700/4 "2021-02-05T14:59:50Z")

</div>

I think using/not using `OpenMP::OpenMP_CXX` should be enough. It comes with the `-fopenmp` flag attached to its use already, so you shouldn’t need to do anything with the flag (additionally, its spelling can change based on the compiler in use; the target already accounts for that).

---

_[View the full topic](https://discourse.cmake.org/t/disable-openmp/2700)._
