diff options
author | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2019-01-21 13:09:36 -0500 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-01-21 20:09:36 +0200 |
commit | 72486afd08d66d6323c2113739dcfff74813058b (patch) | |
tree | ba7ac44b91fc1324c53fb8db12b884fdefbb8249 /mesonbuild/environment.py | |
parent | 20248fa919c5a2e4f9ac1f88f087862da52abfbb (diff) | |
download | meson-72486afd08d66d6323c2113739dcfff74813058b.zip meson-72486afd08d66d6323c2113739dcfff74813058b.tar.gz meson-72486afd08d66d6323c2113739dcfff74813058b.tar.bz2 |
Add PGI C and C++ compilers (#4803)
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 4f5115f..0809ac5 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -63,6 +63,8 @@ from .compilers import ( NAGFortranCompiler, Open64FortranCompiler, PathScaleFortranCompiler, + PGICCompiler, + PGICPPCompiler, PGIFortranCompiler, RustCompiler, CcrxCCompiler, @@ -394,11 +396,11 @@ class Environment: # List of potential compilers. if mesonlib.is_windows(): - self.default_c = ['cl', 'cc', 'gcc', 'clang', 'clang-cl'] - self.default_cpp = ['cl', 'c++', 'g++', 'clang++', 'clang-cl'] + self.default_c = ['cl', 'cc', 'gcc', 'clang', 'clang-cl', 'pgcc'] + self.default_cpp = ['cl', 'c++', 'g++', 'clang++', 'clang-cl', 'pgc++'] else: - self.default_c = ['cc', 'gcc', 'clang'] - self.default_cpp = ['c++', 'g++', 'clang++'] + self.default_c = ['cc', 'gcc', 'clang', 'pgcc'] + self.default_cpp = ['c++', 'g++', 'clang++', 'pgc++'] if mesonlib.is_windows(): self.default_cs = ['csc', 'mcs'] else: @@ -582,6 +584,7 @@ class Environment: def _detect_c_or_cpp_compiler(self, lang, want_cross): popen_exceptions = {} compilers, ccache, is_cross, exe_wrap = self._get_compilers(lang, want_cross) + for compiler in compilers: if isinstance(compiler, str): compiler = [compiler] @@ -704,6 +707,9 @@ class Environment: target = 'x86' cls = VisualStudioCCompiler if lang == 'c' else VisualStudioCPPCompiler return cls(compiler, version, is_cross, exe_wrap, target) + if 'PGI Compilers' in out: + cls = PGICCompiler if lang == 'c' else PGICPPCompiler + return cls(ccache + compiler, version, is_cross, exe_wrap) if '(ICC)' in out: if mesonlib.for_darwin(want_cross, self): compiler_type = CompilerType.ICC_OSX |