4
from numpy.distutils.cpuinfo import cpu
5
from numpy.distutils.fcompiler import FCompiler
7
class NAGFCompiler(FCompiler):
10
version_pattern = r'NAGWare Fortran 95 compiler Release (?P<version>[^\s]*)'
13
'version_cmd' : ["f95", "-V"],
14
'compiler_f77' : ["f95", "-fixed"],
15
'compiler_fix' : ["f95", "-fixed"],
16
'compiler_f90' : ["f95"],
17
'linker_so' : ["f95"],
18
'archiver' : ["ar", "-cr"],
22
def get_flags_linker_so(self):
23
if sys.platform=='darwin':
24
return ['-unsharedf95','-Wl,-bundle,-flat_namespace,-undefined,suppress']
25
return ["-Wl,-shared"]
26
def get_flags_opt(self):
28
def get_flags_arch(self):
29
return ['-target=native']
30
def get_flags_debug(self):
31
return ['-g','-gline','-g90','-nan','-C']
33
if __name__ == '__main__':
34
from distutils import log
36
from numpy.distutils.fcompiler import new_fcompiler
37
compiler = new_fcompiler(compiler='nag')
39
print compiler.get_version()