restore PGI compile functioning
This commit is contained in:
parent
4de093c8d5
commit
fff88b354a
|
@ -1309,6 +1309,8 @@ class CompilerType(enum.Enum):
|
||||||
|
|
||||||
CCRX_WIN = 40
|
CCRX_WIN = 40
|
||||||
|
|
||||||
|
PGI_STANDARD = 50
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_standard_compiler(self):
|
def is_standard_compiler(self):
|
||||||
return self.name in ('GCC_STANDARD', 'CLANG_STANDARD', 'ICC_STANDARD')
|
return self.name in ('GCC_STANDARD', 'CLANG_STANDARD', 'ICC_STANDARD')
|
||||||
|
@ -1598,6 +1600,25 @@ class GnuCompiler(GnuLikeCompiler):
|
||||||
return ['-fopenmp']
|
return ['-fopenmp']
|
||||||
|
|
||||||
|
|
||||||
|
class PGICompiler:
|
||||||
|
def __init__(self, compiler_type):
|
||||||
|
self.id = 'pgi'
|
||||||
|
self.compiler_type = compiler_type
|
||||||
|
|
||||||
|
default_warn_args = ['-Minform=inform']
|
||||||
|
self.warn_args = {'1': default_warn_args,
|
||||||
|
'2': default_warn_args,
|
||||||
|
'3': default_warn_args}
|
||||||
|
|
||||||
|
def get_module_incdir_args(self):
|
||||||
|
return ('-module', )
|
||||||
|
|
||||||
|
def get_no_warn_args(self):
|
||||||
|
return ['-silent']
|
||||||
|
|
||||||
|
def openmp_flags(self):
|
||||||
|
return ['-fopenmp']
|
||||||
|
|
||||||
class ElbrusCompiler(GnuCompiler):
|
class ElbrusCompiler(GnuCompiler):
|
||||||
# Elbrus compiler is nearly like GCC, but does not support
|
# Elbrus compiler is nearly like GCC, but does not support
|
||||||
# PCH, LTO, sanitizers and color output as of version 1.21.x.
|
# PCH, LTO, sanitizers and color output as of version 1.21.x.
|
||||||
|
|
|
@ -24,6 +24,7 @@ from .compilers import (
|
||||||
GnuCompiler,
|
GnuCompiler,
|
||||||
ElbrusCompiler,
|
ElbrusCompiler,
|
||||||
IntelCompiler,
|
IntelCompiler,
|
||||||
|
PGICompiler
|
||||||
)
|
)
|
||||||
|
|
||||||
from mesonbuild.mesonlib import EnvironmentException, is_osx
|
from mesonbuild.mesonlib import EnvironmentException, is_osx
|
||||||
|
@ -372,20 +373,13 @@ class PathScaleFortranCompiler(FortranCompiler):
|
||||||
class PGIFortranCompiler(FortranCompiler):
|
class PGIFortranCompiler(FortranCompiler):
|
||||||
def __init__(self, exelist, version, is_cross, exe_wrapper=None, **kwags):
|
def __init__(self, exelist, version, is_cross, exe_wrapper=None, **kwags):
|
||||||
FortranCompiler.__init__(self, exelist, version, is_cross, exe_wrapper, **kwags)
|
FortranCompiler.__init__(self, exelist, version, is_cross, exe_wrapper, **kwags)
|
||||||
self.id = 'pgi'
|
PGICompiler.__init__(self, CompilerType.PGI_STANDARD)
|
||||||
default_warn_args = ['-Minform=inform']
|
|
||||||
self.warn_args = {'1': default_warn_args,
|
|
||||||
'2': default_warn_args,
|
|
||||||
'3': default_warn_args}
|
|
||||||
|
|
||||||
def get_module_incdir_args(self):
|
def get_always_args(self):
|
||||||
return ('-module', )
|
"""PGI doesn't have -pipe."""
|
||||||
|
val = super().get_always_args()
|
||||||
def get_no_warn_args(self):
|
val.remove('-pipe')
|
||||||
return ['-silent']
|
return val
|
||||||
|
|
||||||
def openmp_flags(self):
|
|
||||||
return ['-fopenmp']
|
|
||||||
|
|
||||||
|
|
||||||
class Open64FortranCompiler(FortranCompiler):
|
class Open64FortranCompiler(FortranCompiler):
|
||||||
|
|
|
@ -404,7 +404,7 @@ class Environment:
|
||||||
self.default_objc = ['cc']
|
self.default_objc = ['cc']
|
||||||
self.default_objcpp = ['c++']
|
self.default_objcpp = ['c++']
|
||||||
self.default_d = ['ldc2', 'ldc', 'gdc', 'dmd']
|
self.default_d = ['ldc2', 'ldc', 'gdc', 'dmd']
|
||||||
self.default_fortran = ['gfortran', 'g95', 'f95', 'f90', 'f77', 'ifort']
|
self.default_fortran = ['gfortran', 'g95', 'f95', 'f90', 'f77', 'ifort', 'pgfortran']
|
||||||
self.default_java = ['javac']
|
self.default_java = ['javac']
|
||||||
self.default_rust = ['rustc']
|
self.default_rust = ['rustc']
|
||||||
self.default_swift = ['swiftc']
|
self.default_swift = ['swiftc']
|
||||||
|
|
Loading…
Reference in New Issue