summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/fortran.py
diff options
context:
space:
mode:
authorElliott Sales de Andrade <quantum.analyst@gmail.com>2018-04-07 04:06:29 -0400
committerElliott Sales de Andrade <quantum.analyst@gmail.com>2018-04-17 02:04:37 -0400
commitdbb025a175f31dfb1c8bb3a1e3bb7030e2625329 (patch)
tree88534c032302debb17a42b4c2476013088b2405c /mesonbuild/compilers/fortran.py
parentf7a7059250ab9cf71c68ca78812a24a35ee745f6 (diff)
downloadmeson-dbb025a175f31dfb1c8bb3a1e3bb7030e2625329.tar.gz
Add an OpenMP dependency.
This works similarly to the thread dependency which stores the various inconsistent flags in each compiler.
Diffstat (limited to 'mesonbuild/compilers/fortran.py')
-rw-r--r--mesonbuild/compilers/fortran.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/mesonbuild/compilers/fortran.py b/mesonbuild/compilers/fortran.py
index 5bb3ec9ca..9d3240f45 100644
--- a/mesonbuild/compilers/fortran.py
+++ b/mesonbuild/compilers/fortran.py
@@ -180,6 +180,9 @@ class GnuFortranCompiler(FortranCompiler):
"""
return ['-Wl,--out-implib=' + implibname]
+ def openmp_flags(self):
+ return ['-fopenmp']
+
class ElbrusFortranCompiler(GnuFortranCompiler, ElbrusCompiler):
def __init__(self, exelist, version, gcc_type, is_cross, exe_wrapper=None, defines=None, **kwargs):
@@ -231,6 +234,9 @@ class SunFortranCompiler(FortranCompiler):
def get_module_outdir_args(self, path):
return ['-moddir=' + path]
+ def openmp_flags(self):
+ return ['-xopenmp']
+
class IntelFortranCompiler(IntelCompiler, FortranCompiler):
std_warn_args = ['-warn', 'all']
@@ -263,6 +269,10 @@ class PathScaleFortranCompiler(FortranCompiler):
def get_std_warn_args(self, level):
return PathScaleFortranCompiler.std_warn_args
+ def openmp_flags(self):
+ return ['-mp']
+
+
class PGIFortranCompiler(FortranCompiler):
std_warn_args = ['-Minform=inform']
@@ -282,6 +292,9 @@ class PGIFortranCompiler(FortranCompiler):
def get_no_warn_args(self):
return ['-silent']
+ def openmp_flags(self):
+ return ['-fopenmp']
+
class Open64FortranCompiler(FortranCompiler):
std_warn_args = ['-fullwarn']
@@ -296,6 +309,9 @@ class Open64FortranCompiler(FortranCompiler):
def get_warn_args(self, level):
return Open64FortranCompiler.std_warn_args
+ def openmp_flags(self):
+ return ['-mp']
+
class NAGFortranCompiler(FortranCompiler):
std_warn_args = []
@@ -309,3 +325,6 @@ class NAGFortranCompiler(FortranCompiler):
def get_warn_args(self, level):
return NAGFortranCompiler.std_warn_args
+
+ def openmp_flags(self):
+ return ['-openmp']