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.
pull/5116/head
Dylan Baker 6 years ago
parent 7a02b76e70
commit 2a6b8e209f
  1. 3
      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)

Loading…
Cancel
Save