diff options
author | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2020-07-13 00:16:52 -0400 |
---|---|---|
committer | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2020-07-13 00:16:52 -0400 |
commit | f985bb7383b519e90bf07d7925e37d6047b82461 (patch) | |
tree | 90678f12976523639c8584d358a0d36c9c4208d2 /mesonbuild/compilers | |
parent | c57616884f02dfd661bca5766acd409582dac83b (diff) | |
download | meson-f985bb7383b519e90bf07d7925e37d6047b82461.zip meson-f985bb7383b519e90bf07d7925e37d6047b82461.tar.gz meson-f985bb7383b519e90bf07d7925e37d6047b82461.tar.bz2 |
add Nvidia HPC SDK compilers
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r-- | mesonbuild/compilers/__init__.py | 6 | ||||
-rw-r--r-- | mesonbuild/compilers/c.py | 9 | ||||
-rw-r--r-- | mesonbuild/compilers/cpp.py | 17 | ||||
-rw-r--r-- | mesonbuild/compilers/fortran.py | 17 |
4 files changed, 45 insertions, 4 deletions
diff --git a/mesonbuild/compilers/__init__.py b/mesonbuild/compilers/__init__.py index fd47545..2e673da 100644 --- a/mesonbuild/compilers/__init__.py +++ b/mesonbuild/compilers/__init__.py @@ -85,6 +85,9 @@ __all__ = [ 'ObjCPPCompiler', 'Open64FortranCompiler', 'PathScaleFortranCompiler', + 'NvidiaHPC_CCompiler', + 'NvidiaHPC_CPPCompiler', + 'NvidiaHPC_FortranCompiler', 'PGICCompiler', 'PGICPPCompiler', 'PGIFortranCompiler', @@ -135,6 +138,7 @@ from .c import ( EmscriptenCCompiler, IntelCCompiler, IntelClCCompiler, + NvidiaHPC_CCompiler, PGICCompiler, CcrxCCompiler, Xc16CCompiler, @@ -153,6 +157,7 @@ from .cpp import ( EmscriptenCPPCompiler, IntelCPPCompiler, IntelClCPPCompiler, + NvidiaHPC_CPPCompiler, PGICPPCompiler, CcrxCPPCompiler, C2000CPPCompiler, @@ -177,6 +182,7 @@ from .fortran import ( NAGFortranCompiler, Open64FortranCompiler, PathScaleFortranCompiler, + NvidiaHPC_FortranCompiler, PGIFortranCompiler, SunFortranCompiler, ) diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index aac99b4..355abe6 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -255,6 +255,15 @@ class PGICCompiler(PGICompiler, CCompiler): PGICompiler.__init__(self) +class NvidiaHPC_CCompiler(PGICompiler, CCompiler): + def __init__(self, exelist, version, for_machine: MachineChoice, + is_cross, info: 'MachineInfo', exe_wrapper=None, **kwargs): + CCompiler.__init__(self, exelist, version, for_machine, is_cross, + info, exe_wrapper, **kwargs) + PGICompiler.__init__(self) + self.id = 'nvidia_hpc' + + class ElbrusCCompiler(GnuCCompiler, ElbrusCompiler): def __init__(self, exelist, version, for_machine: MachineChoice, is_cross, info: 'MachineInfo', exe_wrapper=None, diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index 478a68c..961ede8 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -156,7 +156,7 @@ class CPPCompiler(CLikeCompiler, Compiler): class ClangCPPCompiler(ClangCompiler, CPPCompiler): def __init__(self, exelist, version, for_machine: MachineChoice, is_cross, info: 'MachineInfo', exe_wrapper=None, - defines : T.Optional[T.List[str]] = None, **kwargs): + defines: T.Optional[T.List[str]] = None, **kwargs): CPPCompiler.__init__(self, exelist, version, for_machine, is_cross, info, exe_wrapper, **kwargs) ClangCompiler.__init__(self, defines) @@ -240,8 +240,8 @@ class ArmclangCPPCompiler(ArmclangCompiler, CPPCompiler): def __init__(self, exelist, version, for_machine: MachineChoice, is_cross, info: 'MachineInfo', exe_wrapper=None, **kwargs): CPPCompiler.__init__(self, exelist=exelist, version=version, - for_machine=for_machine, is_cross=is_cross, - info=info, exe_wrapper=exe_wrapper, **kwargs) + for_machine=for_machine, is_cross=is_cross, + info=info, exe_wrapper=exe_wrapper, **kwargs) ArmclangCompiler.__init__(self) default_warn_args = ['-Wall', '-Winvalid-pch', '-Wnon-virtual-dtor'] self.warn_args = {'0': [], @@ -305,7 +305,7 @@ class GnuCPPCompiler(GnuCompiler, CPPCompiler): 'std': coredata.UserComboOption( 'C++ language standard to use', ['none', 'c++98', 'c++03', 'c++11', 'c++14', 'c++17', 'c++1z', 'c++2a', - 'gnu++03', 'gnu++11', 'gnu++14', 'gnu++17', 'gnu++1z', 'gnu++2a'], + 'gnu++03', 'gnu++11', 'gnu++14', 'gnu++17', 'gnu++1z', 'gnu++2a'], 'none', ), 'debugstl': coredata.UserBooleanOption( @@ -356,6 +356,15 @@ class PGICPPCompiler(PGICompiler, CPPCompiler): PGICompiler.__init__(self) +class NvidiaHPC_CPPCompiler(PGICompiler, CPPCompiler): + def __init__(self, exelist, version, for_machine: MachineChoice, + is_cross, info: 'MachineInfo', exe_wrapper=None, **kwargs): + CPPCompiler.__init__(self, exelist, version, for_machine, is_cross, info, exe_wrapper, **kwargs) + PGICompiler.__init__(self) + + self.id = 'nvidia_hpc' + + class ElbrusCPPCompiler(GnuCPPCompiler, ElbrusCompiler): def __init__(self, exelist, version, for_machine: MachineChoice, is_cross, info: 'MachineInfo', exe_wrapper=None, diff --git a/mesonbuild/compilers/fortran.py b/mesonbuild/compilers/fortran.py index af83c0e56..7ca3073 100644 --- a/mesonbuild/compilers/fortran.py +++ b/mesonbuild/compilers/fortran.py @@ -418,6 +418,23 @@ class PGIFortranCompiler(PGICompiler, FortranCompiler): return ['-lpgf90rtl', '-lpgf90', '-lpgf90_rpm1', '-lpgf902', '-lpgf90rtl', '-lpgftnrtl', '-lrt'] + +class NvidiaHPC_FortranCompiler(PGICompiler, FortranCompiler): + def __init__(self, exelist, version, for_machine: MachineChoice, + is_cross, info: 'MachineInfo', exe_wrapper=None, + **kwargs): + FortranCompiler.__init__(self, exelist, version, for_machine, + is_cross, info, exe_wrapper, **kwargs) + PGICompiler.__init__(self) + + self.id = 'nvidia_hpc' + default_warn_args = ['-Minform=inform'] + self.warn_args = {'0': [], + '1': default_warn_args, + '2': default_warn_args, + '3': default_warn_args + ['-Mdclchk']} + + class FlangFortranCompiler(ClangCompiler, FortranCompiler): def __init__(self, exelist, version, for_machine: MachineChoice, is_cross, info: 'MachineInfo', exe_wrapper=None, |