aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/misc.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2019-07-30 18:05:00 +0300
committerGitHub <noreply@github.com>2019-07-30 18:05:00 +0300
commit986587067cf49d4466a706f94c8247e6992873c8 (patch)
tree3dd88617d6bd0714697ffbaba43e14d88e6cd58a /mesonbuild/dependencies/misc.py
parent645a8584fede006915f053de4787e1cef610f2d9 (diff)
parentdfa52469d7dac6fbed285e90dbbd1b491cb5a471 (diff)
downloadmeson-986587067cf49d4466a706f94c8247e6992873c8.zip
meson-986587067cf49d4466a706f94c8247e6992873c8.tar.gz
meson-986587067cf49d4466a706f94c8247e6992873c8.tar.bz2
Merge pull request #5734 from scivision/flang_fix
Flang: Fortran project_tests fixes
Diffstat (limited to 'mesonbuild/dependencies/misc.py')
-rw-r--r--mesonbuild/dependencies/misc.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py
index 1bb1b6e..c463ec3 100644
--- a/mesonbuild/dependencies/misc.py
+++ b/mesonbuild/dependencies/misc.py
@@ -380,11 +380,14 @@ class OpenMPDependency(ExternalDependency):
if openmp_date:
self.version = self.VERSIONS[openmp_date]
- if self.clib_compiler.has_header('omp.h', '', self.env, dependencies=[self], disable_cache=True)[0]:
- self.is_found = True
- self.compile_args = self.link_args = self.clib_compiler.openmp_flags()
- else:
- mlog.log(mlog.yellow('WARNING:'), 'OpenMP found but omp.h missing.')
+ # Flang has omp_lib.h
+ header_names = ('omp.h', 'omp_lib.h')
+ for name in header_names:
+ if self.clib_compiler.has_header(name, '', self.env, dependencies=[self], disable_cache=True)[0]:
+ self.is_found = True
+ self.compile_args = self.link_args = self.clib_compiler.openmp_flags()
+ else:
+ mlog.log(mlog.yellow('WARNING:'), 'OpenMP found but omp.h missing.')
class ThreadDependency(ExternalDependency):