]> git.ipfire.org Git - thirdparty/gcc.git/blob - libgomp/doc/enabling-openmp.rst
368bc44fe1288a33112c4bb7f3e3c4a0b5799c9e
[thirdparty/gcc.git] / libgomp / doc / enabling-openmp.rst
1 ..
2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
5
6 .. _enabling-openmp:
7
8 Enabling OpenMP
9 ---------------
10
11 To activate the OpenMP extensions for C/C++ and Fortran, the compile-time
12 flag :command:`-fopenmp` must be specified. This enables the OpenMP directive
13 ``#pragma omp`` in C/C++ and ``!$omp`` directives in free form,
14 ``c$omp``, ``*$omp`` and ``!$omp`` directives in fixed form,
15 ``!$`` conditional compilation sentinels in free form and ``c$``,
16 ``*$`` and ``!$`` sentinels in fixed form, for Fortran. The flag also
17 arranges for automatic linking of the OpenMP runtime library
18 (:ref:`runtime-library-routines`).
19
20 A complete description of all OpenMP directives may be found in the
21 `OpenMP Application Program Interface <https://www.openmp.org>`_ manuals.
22 See also :ref:`openmp-implementation-status`.