diff options
Diffstat (limited to 'fcompiler/intel.py')
-rw-r--r-- | fcompiler/intel.py | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/fcompiler/intel.py b/fcompiler/intel.py index bc7a15bb6..2c34d69ed 100644 --- a/fcompiler/intel.py +++ b/fcompiler/intel.py @@ -1,21 +1,28 @@ +# -*- encoding: iso-8859-1 -*- +# above encoding b/c there's a non-ASCII character in the sample output +# of intele # http://developer.intel.com/software/products/compilers/flin/ import os 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 compilers = ['IntelFCompiler', 'IntelVisualFCompiler', 'IntelItaniumFCompiler', 'IntelItaniumVisualFCompiler', 'IntelEM64TFCompiler'] +def intel_version_match(type): + # Match against the important stuff in the version string + return simple_version_match(start=r'Intel.*?Fortran.*?%s.*?Version' % (type,)) + class IntelFCompiler(FCompiler): compiler_type = 'intel' description = 'Intel Fortran Compiler for 32-bit apps' - version_pattern = r'Intel\(R\) Fortran Compiler for 32-bit '\ - 'applications, Version (?P<version>[^\s*]*)' + version_match = intel_version_match('32-bit') possible_executables = ['ifort', 'ifc'] @@ -78,9 +85,8 @@ class IntelFCompiler(FCompiler): class IntelItaniumFCompiler(IntelFCompiler): compiler_type = 'intele' description = 'Intel Fortran Compiler for Itanium apps' - version_pattern = r'Intel\(R\) Fortran (90 Compiler Itanium\(TM\)|Itanium\(R\)) Compiler'\ - ' for (the Itanium\(TM\)|Itanium\(R\))-based applications(,|)'\ - '\s+Version (?P<version>[^\s*]*)' + + version_match = intel_version_match('Itanium') #Intel(R) Fortran Itanium(R) Compiler for Itanium(R)-based applications #Version 9.1 Build 20060928 Package ID: l_fc_c_9.1.039 @@ -104,8 +110,7 @@ class IntelEM64TFCompiler(IntelFCompiler): compiler_type = 'intelem' description = 'Intel Fortran Compiler for EM64T-based apps' - version_pattern = r'Intel\(R\) Fortran Compiler for Intel\(R\) EM64T-based '\ - 'applications, Version (?P<version>[^\s*]*)' + version_match = intel_version_match('EM64T-based') possible_executables = ['ifort', 'efort', 'efc'] @@ -126,12 +131,14 @@ class IntelEM64TFCompiler(IntelFCompiler): opt.extend(['-tpp7', '-xW']) return opt -class IntelVisualFCompiler(FCompiler): +# Is there no difference in the version string between the above compilers +# and the Visual compilers? +class IntelVisualFCompiler(FCompiler): compiler_type = 'intelv' description = 'Intel Visual Fortran Compiler for 32-bit apps' - version_pattern = r'Intel\(R\) Fortran Compiler for 32-bit applications, '\ - 'Version (?P<version>[^\s*]*)' + + version_match = intel_version_match('32-bit') ar_exe = 'lib.exe' fc_exe = 'ifl' @@ -181,12 +188,10 @@ class IntelVisualFCompiler(FCompiler): return opt class IntelItaniumVisualFCompiler(IntelVisualFCompiler): - compiler_type = 'intelev' description = 'Intel Visual Fortran Compiler for Itanium apps' - version_pattern = r'Intel\(R\) Fortran (90 Compiler Itanium\(TM\)|Itanium\(R\)) Compiler'\ - ' for (the Itanium\(TM\)|Itanium\(R\))-based applications(,|)'\ - '\s+Version (?P<version>[^\s*]*)' + + version_match = intel_version_match('Itanium') fc_exe = 'efl' # XXX this is a wild guess ar_exe = IntelVisualFCompiler.ar_exe |