diff options
author | cookedm <cookedm@localhost> | 2007-05-25 11:41:16 +0000 |
---|---|---|
committer | cookedm <cookedm@localhost> | 2007-05-25 11:41:16 +0000 |
commit | 5267b3e16654ef326f525fdb9a1287a88396c616 (patch) | |
tree | 9e7137815415c08577f5451266cdc70f7caa3ea7 /numpy/distutils/fcompiler/intel.py | |
parent | d11dbc78c0df5055a6ed57285775cc18dbe1721a (diff) | |
download | numpy-5267b3e16654ef326f525fdb9a1287a88396c616.tar.gz |
merge from distutils-revamp branch (step 2)
- fcompiler changes. All flags, executables, etc., should be overridable
by the user with config_fc (either command line or setup.cfg) or by
environment variables
Diffstat (limited to 'numpy/distutils/fcompiler/intel.py')
-rw-r--r-- | numpy/distutils/fcompiler/intel.py | 79 |
1 files changed, 40 insertions, 39 deletions
diff --git a/numpy/distutils/fcompiler/intel.py b/numpy/distutils/fcompiler/intel.py index f5e57dda2..6256dd953 100644 --- a/numpy/distutils/fcompiler/intel.py +++ b/numpy/distutils/fcompiler/intel.py @@ -9,7 +9,10 @@ import sys from numpy.distutils.cpuinfo import cpu from numpy.distutils.ccompiler import simple_version_match from numpy.distutils.fcompiler import FCompiler, dummy_fortran_file -from numpy.distutils.exec_command import find_executable + +compilers = ['IntelFCompiler', 'IntelVisualFCompiler', + 'IntelItaniumFCompiler', 'IntelItaniumVisualFCompiler', + 'IntelEM64TFCompiler'] def intel_version_match(type): # Match against the important stuff in the version string @@ -18,19 +21,18 @@ def intel_version_match(type): class IntelFCompiler(FCompiler): compiler_type = 'intel' + description = 'Intel Fortran Compiler for 32-bit apps' version_match = intel_version_match('32-bit') - for fc_exe in map(find_executable,['ifort','ifc']): - if os.path.isfile(fc_exe): - break + possible_executables = ['ifort', 'ifc'] executables = { - 'version_cmd' : [fc_exe, "-FI -V -c %(fname)s.f -o %(fname)s.o" \ + 'version_cmd' : ["<F77>", "-FI -V -c %(fname)s.f -o %(fname)s.o" \ % {'fname':dummy_fortran_file()}], - 'compiler_f77' : [fc_exe,"-72","-w90","-w95"], - 'compiler_fix' : [fc_exe,"-FI"], - 'compiler_f90' : [fc_exe], - 'linker_so' : [fc_exe,"-shared"], + 'compiler_f77' : [None,"-72","-w90","-w95"], + 'compiler_f90' : [None], + 'compiler_fix' : [None,"-FI"], + 'linker_so' : ["<F90>","-shared"], 'archiver' : ["ar", "-cr"], 'ranlib' : ["ranlib"] } @@ -80,6 +82,7 @@ class IntelFCompiler(FCompiler): class IntelItaniumFCompiler(IntelFCompiler): compiler_type = 'intele' + description = 'Intel Fortran Compiler for Itanium apps' version_match = intel_version_match('Itanium') @@ -88,37 +91,34 @@ class IntelItaniumFCompiler(IntelFCompiler): #Copyright (C) 1985-2006 Intel Corporation. All rights reserved. #30 DAY EVALUATION LICENSE - for fc_exe in map(find_executable,['ifort','efort','efc']): - if os.path.isfile(fc_exe): - break + possible_executables = ['ifort', 'efort', 'efc'] executables = { - 'version_cmd' : [fc_exe, "-FI -V -c %(fname)s.f -o %(fname)s.o" \ + 'version_cmd' : ['<F77>', "-FI -V -c %(fname)s.f -o %(fname)s.o" \ % {'fname':dummy_fortran_file()}], - 'compiler_f77' : [fc_exe,"-FI","-w90","-w95"], - 'compiler_fix' : [fc_exe,"-FI"], - 'compiler_f90' : [fc_exe], - 'linker_so' : [fc_exe,"-shared"], + 'compiler_f77' : [None,"-FI","-w90","-w95"], + 'compiler_fix' : [None,"-FI"], + 'compiler_f90' : [None], + 'linker_so' : ['<F90>', "-shared"], 'archiver' : ["ar", "-cr"], 'ranlib' : ["ranlib"] } class IntelEM64TFCompiler(IntelFCompiler): compiler_type = 'intelem' + description = 'Intel Fortran Compiler for EM64T-based apps' version_match = intel_version_match('EM64T-based') - for fc_exe in map(find_executable,['ifort','efort','efc']): - if os.path.isfile(fc_exe): - break + possible_executables = ['ifort', 'efort', 'efc'] executables = { - 'version_cmd' : [fc_exe, "-FI -V -c %(fname)s.f -o %(fname)s.o" \ + 'version_cmd' : ['<F77>', "-FI -V -c %(fname)s.f -o %(fname)s.o" \ % {'fname':dummy_fortran_file()}], - 'compiler_f77' : [fc_exe,"-FI","-w90","-w95"], - 'compiler_fix' : [fc_exe,"-FI"], - 'compiler_f90' : [fc_exe], - 'linker_so' : [fc_exe,"-shared"], + 'compiler_f77' : [None, "-FI", "-w90", "-w95"], + 'compiler_fix' : [None, "-FI"], + 'compiler_f90' : [None], + 'linker_so' : ['<F90>', "-shared"], 'archiver' : ["ar", "-cr"], 'ranlib' : ["ranlib"] } @@ -133,20 +133,20 @@ class IntelEM64TFCompiler(IntelFCompiler): # and the Visual compilers? class IntelVisualFCompiler(FCompiler): - compiler_type = 'intelv' + description = 'Intel Visual Fortran Compiler for 32-bit apps' version_match = intel_version_match('32-bit') ar_exe = 'lib.exe' - fc_exe = 'ifl' + possible_executables = ['ifl'] executables = { - 'version_cmd' : [fc_exe, "-FI -V -c %(fname)s.f -o %(fname)s.o" \ + 'version_cmd' : ['<F77>', "-FI -V -c %(fname)s.f -o %(fname)s.o" \ % {'fname':dummy_fortran_file()}], - 'compiler_f77' : [fc_exe,"-FI","-w90","-w95"], - 'compiler_fix' : [fc_exe,"-FI","-4L72","-w"], - 'compiler_f90' : [fc_exe], - 'linker_so' : [fc_exe,"-shared"], + 'compiler_f77' : [None,"-FI","-w90","-w95"], + 'compiler_fix' : [None,"-FI","-4L72","-w"], + 'compiler_f90' : [None], + 'linker_so' : ['<F90>', "-shared"], 'archiver' : [ar_exe, "/verbose", "/OUT:"], 'ranlib' : None } @@ -185,20 +185,21 @@ class IntelVisualFCompiler(FCompiler): return opt class IntelItaniumVisualFCompiler(IntelVisualFCompiler): - compiler_type = 'intelev' + description = 'Intel Visual Fortran Compiler for Itanium apps' + version_match = intel_version_match('Itanium') - fc_exe = 'efl' # XXX this is a wild guess + possible_executables = ['efl'] # XXX this is a wild guess ar_exe = IntelVisualFCompiler.ar_exe executables = { - 'version_cmd' : [fc_exe, "-FI -V -c %(fname)s.f -o %(fname)s.o" \ + 'version_cmd' : ['<F77>', "-FI -V -c %(fname)s.f -o %(fname)s.o" \ % {'fname':dummy_fortran_file()}], - 'compiler_f77' : [fc_exe,"-FI","-w90","-w95"], - 'compiler_fix' : [fc_exe,"-FI","-4L72","-w"], - 'compiler_f90' : [fc_exe], - 'linker_so' : [fc_exe,"-shared"], + 'compiler_f77' : [None,"-FI","-w90","-w95"], + 'compiler_fix' : [None,"-FI","-4L72","-w"], + 'compiler_f90' : [None], + 'linker_so' : ['<F90>',"-shared"], 'archiver' : [ar_exe, "/verbose", "/OUT:"], 'ranlib' : None } |