aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/c.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/c.py
parentf7a7059250ab9cf71c68ca78812a24a35ee745f6 (diff)
downloadmeson-dbb025a175f31dfb1c8bb3a1e3bb7030e2625329.zip
meson-dbb025a175f31dfb1c8bb3a1e3bb7030e2625329.tar.gz
meson-dbb025a175f31dfb1c8bb3a1e3bb7030e2625329.tar.bz2
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/c.py')
-rw-r--r--mesonbuild/compilers/c.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py
index 4263536..279e435 100644
--- a/mesonbuild/compilers/c.py
+++ b/mesonbuild/compilers/c.py
@@ -296,6 +296,8 @@ class CCompiler(Compiler):
args += d.get_compile_args()
if d.need_threads():
args += self.thread_flags(env)
+ elif d.need_openmp():
+ args += self.openmp_flags()
if mode == 'link':
# Add link flags needed to find dependencies
args += d.get_link_args()
@@ -1086,6 +1088,9 @@ class VisualStudioCCompiler(CCompiler):
def build_rpath_args(self, build_dir, from_dir, rpath_paths, build_rpath, install_rpath):
return []
+ def openmp_flags(self):
+ return ['/openmp']
+
# FIXME, no idea what these should be.
def thread_flags(self, env):
return []