Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/mingw32/Python27/Lib/site-packages/numpy/distutils/fcompiler/nag.py @ 87:2a2c65a20a8b
Add Python libs and headers
author | Chris Cannam |
---|---|
date | Wed, 25 Feb 2015 14:05:22 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
86:413a9d26189e | 87:2a2c65a20a8b |
---|---|
1 from __future__ import division, absolute_import, print_function | |
2 | |
3 import sys | |
4 from numpy.distutils.fcompiler import FCompiler | |
5 | |
6 compilers = ['NAGFCompiler'] | |
7 | |
8 class NAGFCompiler(FCompiler): | |
9 | |
10 compiler_type = 'nag' | |
11 description = 'NAGWare Fortran 95 Compiler' | |
12 version_pattern = r'NAGWare Fortran 95 compiler Release (?P<version>[^\s]*)' | |
13 | |
14 executables = { | |
15 'version_cmd' : ["<F90>", "-V"], | |
16 'compiler_f77' : ["f95", "-fixed"], | |
17 'compiler_fix' : ["f95", "-fixed"], | |
18 'compiler_f90' : ["f95"], | |
19 'linker_so' : ["<F90>"], | |
20 'archiver' : ["ar", "-cr"], | |
21 'ranlib' : ["ranlib"] | |
22 } | |
23 | |
24 def get_flags_linker_so(self): | |
25 if sys.platform=='darwin': | |
26 return ['-unsharedf95', '-Wl,-bundle,-flat_namespace,-undefined,suppress'] | |
27 return ["-Wl,-shared"] | |
28 def get_flags_opt(self): | |
29 return ['-O4'] | |
30 def get_flags_arch(self): | |
31 version = self.get_version() | |
32 if version and version < '5.1': | |
33 return ['-target=native'] | |
34 else: | |
35 return [''] | |
36 def get_flags_debug(self): | |
37 return ['-g', '-gline', '-g90', '-nan', '-C'] | |
38 | |
39 if __name__ == '__main__': | |
40 from distutils import log | |
41 log.set_verbosity(2) | |
42 from numpy.distutils.fcompiler import new_fcompiler | |
43 compiler = new_fcompiler(compiler='nag') | |
44 compiler.customize() | |
45 print(compiler.get_version()) |