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.
This commit is contained in:
Dylan Baker 2019-03-19 12:47:15 -07:00
parent 7a02b76e70
commit 2a6b8e209f
1 changed files with 2 additions and 1 deletions

View File

@ -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)