diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2019-03-19 12:47:15 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-03-19 12:48:22 -0700 |
commit | 2a6b8e209fc6cbcd9499a0697c08bcb0169a2e54 (patch) | |
tree | a76b2252cfa0134c84ed3a11c6fee3acfd39f4af | |
parent | 7a02b76e70e219e5201e322c6c6c232d06601920 (diff) | |
download | meson-2a6b8e209fc6cbcd9499a0697c08bcb0169a2e54.zip meson-2a6b8e209fc6cbcd9499a0697c08bcb0169a2e54.tar.gz meson-2a6b8e209fc6cbcd9499a0697c08bcb0169a2e54.tar.bz2 |
dependencies/openmp: Pass openmp arguments to look for _OPENMP define
On GCC anc Clang th _OPENMP preprocessor define is only defined if
-fopenmp is passed to the compiler.
-rw-r--r-- | mesonbuild/dependencies/misc.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py index c95acff..51dc9f3 100644 --- a/mesonbuild/dependencies/misc.py +++ b/mesonbuild/dependencies/misc.py @@ -363,7 +363,8 @@ class OpenMPDependency(ExternalDependency): super().__init__('openmp', environment, language, kwargs) self.is_found = False try: - openmp_date = self.clib_compiler.get_define('_OPENMP', '', self.env, [], [self]) + openmp_date = self.clib_compiler.get_define( + '_OPENMP', '', self.env, self.clib_compiler.openmp_flags(), [self]) except mesonlib.EnvironmentException as e: mlog.debug('OpenMP support not available in the compiler') mlog.debug(e) |