Finds Open Multi-Processing (OpenMP) support.
This module can be used to detect OpenMP support in a compiler. If the compiler supports OpenMP, the flags required to compile with OpenMP support are returned in variables for the different languages. The variables may be empty if the compiler does not need a special flag to support OpenMP.
New in version 3.5: Clang support.
New in version 3.10: The module exposes the components
Each of these controls the various languages to search OpenMP support for.
Depending on the enabled components the following variables will be set:
Variable indicating that OpenMP flags for all requested languages have been found. If no components are specified, this is true if OpenMP settings for all enabled languages were detected.
Minimal version of the OpenMP standard detected among the requested languages, or all enabled languages if no components were specified.
This module will set the following variables per language in your
<lang> is one of C, CXX, or Fortran:
Variable indicating if OpenMP support for
OpenMP compiler flags for
<lang>, separated by spaces.
Directories that must be added to the header search path for
<lang>when using OpenMP.
For linking with OpenMP code written in
<lang>, the following
variables are provided:
;-list of libraries for OpenMP programs for
Location of the individual libraries needed for OpenMP support in
A list of libraries needed to link with OpenMP code written in
Additionally, the module provides
Target for using OpenMP from
Specifically for Fortran, the module sets the following variables:
Boolean indicating if OpenMP is accessible through
Boolean indicating if OpenMP is accessible through the
The module will also try to provide the OpenMP version variables:
New in version 3.7.
Date of the OpenMP specification implemented by the
Major version of OpenMP implemented by the
Minor version of OpenMP implemented by the
OpenMP version implemented by the
The specification date is formatted as given in the OpenMP standard:
mm represents the year and month of
the OpenMP specification implemented by the
For some compilers, it may be necessary to add a header search path to find
the relevant OpenMP headers. This location may be language-specific. Where
this is needed, the module may attempt to find the location, but it can be
provided directly by setting the
OpenMP_<lang>_INCLUDE_DIR cache variable.
Note that this variable is an _input_ control to the module. Project code
should use the
OpenMP_<lang>_INCLUDE_DIRS _output_ variable if it needs
to know what include directories are needed.