aboutsummaryrefslogtreecommitdiff
path: root/environment.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2014-10-11 13:17:04 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2014-10-11 13:17:04 +0300
commit56fba5313065afc0de478b6db924e50367864c32 (patch)
tree27f932d97bb2e760f20e2072f817c40410559eb5 /environment.py
parent43f5166df2c4376f453e869d658b8c97044d2b01 (diff)
downloadmeson-56fba5313065afc0de478b6db924e50367864c32.zip
meson-56fba5313065afc0de478b6db924e50367864c32.tar.gz
meson-56fba5313065afc0de478b6db924e50367864c32.tar.bz2
Nag Fortran compiler definition from Peter Koval.
Diffstat (limited to 'environment.py')
-rw-r--r--environment.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/environment.py b/environment.py
index 5635fc9..1cf26ca 100644
--- a/environment.py
+++ b/environment.py
@@ -1380,6 +1380,28 @@ class Open64FortranCompiler(FortranCompiler):
def get_std_warn_args(self):
return Open64FortranCompiler.std_warn_args
+class NAGFortranCompiler(FortranCompiler):
+ std_warn_args = []
+
+ def __init__(self, exelist, version, is_cross, exe_wrapper=None):
+ super().__init__(exelist, version, is_cross, exe_wrapper=None)
+ self.id = 'nagfor'
+
+ def get_module_outdir_args(self, path):
+ return ['-mdir', 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 NAGFortranCompiler.std_warn_args
+
class VisualStudioLinker():
always_args = ['/NOLOGO']
@@ -1705,6 +1727,9 @@ class Environment():
if 'Open64 Compiler Suite' in err:
return Open64FortranCompiler([compiler], version, is_cross, exe_wrap)
+ if 'NAG Fortran' in err:
+ return NAGFortranCompiler([compiler], version, is_cross, exe_wrap)
+
raise EnvironmentException('Unknown compiler(s): "' + ', '.join(compilers) + '"')
def get_scratch_dir(self):