diff options
Diffstat (limited to 'scipy_distutils/fortefcompiler.py')
-rw-r--r-- | scipy_distutils/fortefcompiler.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/scipy_distutils/fortefcompiler.py b/scipy_distutils/fortefcompiler.py new file mode 100644 index 000000000..37b736c29 --- /dev/null +++ b/scipy_distutils/fortefcompiler.py @@ -0,0 +1,37 @@ +import os +import sys + +from cpuinfo import cpu +from fcompiler import FCompiler + +class ForteFCompiler(FCompiler): + + compiler_type = 'forte' + version_pattern = r'(f90|f95): Forte Developer 7 Fortran 95 (?P<version>[^\s]+).*' + + executables = { + 'version_cmd' : ["f90", "-V"], + 'compiler_f77' : ["f90", "-f77", "-ftrap=%none"], + 'compiler_fix' : ["f90", "-fixed"], + 'compiler_f90' : ["f90"], + 'linker_so' : ["f90","-Bdynamic","-G"], + 'archiver' : ["ar", "-cr"], + 'ranlib' : ["ranlib"] + } + + def get_flags(self): + return ['-xcode=pic32'] + def get_opt(self): + return ['-fast','-dalign'] + def get_arch(self): + return ['-xtarget=generic'] + def get_libraries(self): + opt = FCompiler.get_libraries(self) + opt.extend(['fsu','sunmath','mvec','f77compat']) + return opt + +if __name__ == '__main__': + from fcompiler import new_fcompiler + compiler = new_fcompiler(compiler='forte') + compiler.customize() + print compiler.get_version() |