aboutsummaryrefslogtreecommitdiff
path: root/environment.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2014-09-18 19:05:33 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2014-09-18 19:05:33 +0300
commitf662ef8483d83479fb2451c11b5b8119c154b563 (patch)
treeff568651a1786371cc8356f2f25bb3b025cfe5a9 /environment.py
parent9e7009bf23e2fce52829e195c4c9c29c3f2286fe (diff)
downloadmeson-f662ef8483d83479fb2451c11b5b8119c154b563.zip
meson-f662ef8483d83479fb2451c11b5b8119c154b563.tar.gz
meson-f662ef8483d83479fb2451c11b5b8119c154b563.tar.bz2
More Fortran compiler definitions from Peter Koval.
Diffstat (limited to 'environment.py')
-rw-r--r--environment.py77
1 files changed, 77 insertions, 0 deletions
diff --git a/environment.py b/environment.py
index 8fd5429..e62e1c7 100644
--- a/environment.py
+++ b/environment.py
@@ -1299,6 +1299,74 @@ class IntelFortranCompiler(FortranCompiler):
def get_std_warn_args(self):
return IntelFortranCompiler.std_warn_args
+class PathScaleFortranCompiler(FortranCompiler):
+ std_warn_args = ['-fullwarn']
+
+ def __init__(self, exelist, version, is_cross, exe_wrapper=None):
+ super().__init__(exelist, version, is_cross, exe_wrapper=None)
+ self.id = 'pathscale'
+
+ def get_module_outdir_args(self, path):
+ return ['-module', path]
+
+ def get_always_args(self):
+ return []
+
+ def can_compile(self, src):
+ suffix = os.path.splitext(src)[1].lower()
+ if suffix == '.f' or suffix == '.f90' or suffix == '.f95':
+ return True
+ return False
+
+ def get_std_warn_args(self):
+ return PathScaleFortranCompiler.std_warn_args
+
+class PGIFortranCompiler(FortranCompiler):
+ std_warn_args = ['-Minform=inform']
+
+ def __init__(self, exelist, version, is_cross, exe_wrapper=None):
+ super().__init__(exelist, version, is_cross, exe_wrapper=None)
+ self.id = 'pgi'
+
+ def get_module_outdir_args(self, path):
+ return ['-module', path]
+
+ def get_always_args(self):
+ return []
+
+ def can_compile(self, src):
+ suffix = os.path.splitext(src)[1].lower()
+ if suffix == '.f' or suffix == '.f90' or suffix == '.f95':
+ return True
+ return False
+
+ def get_std_warn_args(self):
+ return PGIFortranCompiler.std_warn_args
+
+
+class Open64FortranCompiler(FortranCompiler):
+ std_warn_args = ['-fullwarn']
+
+ def __init__(self, exelist, version, is_cross, exe_wrapper=None):
+ super().__init__(exelist, version, is_cross, exe_wrapper=None)
+ self.id = 'open64'
+
+ def get_module_outdir_args(self, path):
+ return ['-module', path]
+
+ def get_always_args(self):
+ return []
+
+ def can_compile(self, src):
+ suffix = os.path.splitext(src)[1].lower()
+ if suffix == '.f' or suffix == '.f90' or suffix == '.f95':
+ return True
+ return False
+
+ def get_std_warn_args(self):
+ return Open64FortranCompiler.std_warn_args
+
+
class VisualStudioLinker():
always_args = ['/NOLOGO']
def __init__(self, exelist):
@@ -1613,6 +1681,15 @@ class Environment():
if 'ifort (IFORT)' in out:
return IntelFortranCompiler([compiler], version, is_cross, exe_wrap)
+
+ if 'PathScale EKOPath(tm)' in err:
+ return PathScaleFortranCompiler([compiler], version, is_cross, exe_wrap)
+
+ if 'pgf90' in out:
+ return PGIFortranCompiler([compiler], version, is_cross, exe_wrap)
+
+ if 'Open64 Compiler Suite' in err:
+ return Open64FortranCompiler([compiler], version, is_cross, exe_wrap)
raise EnvironmentException('Unknown compiler(s): "' + ', '.join(compilers) + '"')