diff options
author | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2019-07-28 23:50:37 -0400 |
---|---|---|
committer | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2019-07-30 15:33:11 -0400 |
commit | c2f2e511050d13b7e9e8182c72a507c2d33da97f (patch) | |
tree | 40a80b91d4801acc4e6d16b2f1e5afeaeb81129e /mesonbuild | |
parent | 902d0e579e086cd2733840f7eb5fb90078f1c8b2 (diff) | |
download | meson-c2f2e511050d13b7e9e8182c72a507c2d33da97f.zip meson-c2f2e511050d13b7e9e8182c72a507c2d33da97f.tar.gz meson-c2f2e511050d13b7e9e8182c72a507c2d33da97f.tar.bz2 |
PGI: fix openmp for 190common test
since there is no pgc++ on Windows, we avoid invoking that in 190common
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/dependencies/misc.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py index ffe2feb..cdfa48b 100644 --- a/mesonbuild/dependencies/misc.py +++ b/mesonbuild/dependencies/misc.py @@ -370,20 +370,19 @@ class OpenMPDependency(ExternalDependency): language = kwargs.get('language') super().__init__('openmp', environment, language, kwargs) self.is_found = False + if self.clib_compiler.get_id() == 'pgi': + # through at least PGI 19.4, there is no macro defined for OpenMP, but OpenMP 3.1 is supported. + self.version = '3.1' + self.is_found = True + self.compile_args = self.link_args = self.clib_compiler.openmp_flags() + return try: openmp_date = self.clib_compiler.get_define( '_OPENMP', '', self.env, self.clib_compiler.openmp_flags(), [self], disable_cache=True)[0] except mesonlib.EnvironmentException as e: - if self.clib_compiler.get_id() == 'pgi': - # through at least PGI 19.4, there is no macro defined for OpenMP, but OpenMP 3.1 is supported. - self.version = '3.1' - self.is_found = True - self.compile_args = self.link_args = self.clib_compiler.openmp_flags() - return - else: - mlog.debug('OpenMP support not available in the compiler') - mlog.debug(e) - openmp_date = None + mlog.debug('OpenMP support not available in the compiler') + mlog.debug(e) + openmp_date = None if openmp_date: self.version = self.VERSIONS[openmp_date] |