diff options
Diffstat (limited to 'numpy/distutils/fcompiler/gnu.py')
-rw-r--r-- | numpy/distutils/fcompiler/gnu.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/numpy/distutils/fcompiler/gnu.py b/numpy/distutils/fcompiler/gnu.py index 593b48ac0..7dcc350e4 100644 --- a/numpy/distutils/fcompiler/gnu.py +++ b/numpy/distutils/fcompiler/gnu.py @@ -10,6 +10,7 @@ from numpy.distutils.misc_util import msvc_runtime_library compilers = ['GnuFCompiler', 'Gnu95FCompiler'] +TARGET_R = re.compile("Target: ([a-zA-Z0-9_\-]*)") class GnuFCompiler(FCompiler): compiler_type = 'gnu' compiler_aliases = ('g77',) @@ -275,6 +276,16 @@ class Gnu95FCompiler(GnuFCompiler): opt.remove('cc_dynamic') return opt + def get_target(self): + status, output = exec_command(self.compiler_f77 + + ['-v'], + use_tee=0) + if not status: + m = TARGET_R.search(output) + if m: + print m.group(1) + return "" + if __name__ == '__main__': from distutils import log log.set_verbosity(2) |