diff options
Diffstat (limited to 'numpy/distutils/fcompiler/intel.py')
-rw-r--r-- | numpy/distutils/fcompiler/intel.py | 44 |
1 files changed, 21 insertions, 23 deletions
diff --git a/numpy/distutils/fcompiler/intel.py b/numpy/distutils/fcompiler/intel.py index 028e2cd73..f03a8b014 100644 --- a/numpy/distutils/fcompiler/intel.py +++ b/numpy/distutils/fcompiler/intel.py @@ -13,22 +13,28 @@ compilers = ['IntelFCompiler', 'IntelVisualFCompiler', 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,)) + return simple_version_match(start=r'Intel.*?Fortran.*?(?:%s).*?Version' % (type,)) -class IntelFCompiler(FCompiler): +class BaseIntelFCompiler(FCompiler): + def update_executables(self): + f = dummy_fortran_file() + self.executables['version_cmd'] = ['<F77>', '-FI', '-V', '-c', + f + '.f', '-o', f + '.o'] + +class IntelFCompiler(BaseIntelFCompiler): compiler_type = 'intel' description = 'Intel Fortran Compiler for 32-bit apps' - version_match = intel_version_match('32-bit') + version_match = intel_version_match('32-bit|IA-32') possible_executables = ['ifort', 'ifc'] executables = { - 'version_cmd' : ['<F77>', None], - 'compiler_f77' : [None,"-72","-w90","-w95"], + 'version_cmd' : None, # set by update_executables + 'compiler_f77' : [None, "-72", "-w90", "-w95"], 'compiler_f90' : [None], - 'compiler_fix' : [None,"-FI"], - 'linker_so' : ["<F90>","-shared"], + 'compiler_fix' : [None, "-FI"], + 'linker_so' : ["<F90>", "-shared"], 'archiver' : ["ar", "-cr"], 'ranlib' : ["ranlib"] } @@ -37,10 +43,6 @@ class IntelFCompiler(FCompiler): module_dir_switch = '-module ' # Don't remove ending space! module_include_switch = '-I' - def get_flags_version(self): - f = dummy_fortran_file() - return ['-FI', '-V', '-c', f + '.f', '-o', f + '.o'] - def get_flags(self): opt = self.pic_flags + ["-cm"] return opt @@ -112,9 +114,9 @@ class IntelItaniumFCompiler(IntelFCompiler): possible_executables = ['ifort', 'efort', 'efc'] executables = { - 'version_cmd' : ['<F77>', None], - 'compiler_f77' : [None,"-FI","-w90","-w95"], - 'compiler_fix' : [None,"-FI"], + 'version_cmd' : None, + 'compiler_f77' : [None, "-FI", "-w90", "-w95"], + 'compiler_fix' : [None, "-FI"], 'compiler_f90' : [None], 'linker_so' : ['<F90>', "-shared"], 'archiver' : ["ar", "-cr"], @@ -130,7 +132,7 @@ class IntelEM64TFCompiler(IntelFCompiler): possible_executables = ['ifort', 'efort', 'efc'] executables = { - 'version_cmd' : ['<F77>', None], + 'version_cmd' : None, 'compiler_f77' : [None, "-FI", "-w90", "-w95"], 'compiler_fix' : [None, "-FI"], 'compiler_f90' : [None], @@ -148,16 +150,16 @@ class IntelEM64TFCompiler(IntelFCompiler): # Is there no difference in the version string between the above compilers # and the Visual compilers? -class IntelVisualFCompiler(FCompiler): +class IntelVisualFCompiler(BaseIntelFCompiler): compiler_type = 'intelv' description = 'Intel Visual Fortran Compiler for 32-bit apps' - version_match = intel_version_match('32-bit') + version_match = intel_version_match('32-bit|IA-32') ar_exe = 'lib.exe' possible_executables = ['ifl'] executables = { - 'version_cmd' : ['<F77>', None], + 'version_cmd' : None, 'compiler_f77' : [None,"-FI","-w90","-w95"], 'compiler_fix' : [None,"-FI","-4L72","-w"], 'compiler_f90' : [None], @@ -172,10 +174,6 @@ class IntelVisualFCompiler(FCompiler): module_dir_switch = '/module:' #No space after /module: module_include_switch = '/I' - def get_flags_version(self): - f = dummy_fortran_file() - return ['-FI', '-V', '-c', f + '.f', '-o', f + '.o'] - def get_flags(self): opt = ['/nologo','/MD','/nbs','/Qlowercase','/us'] return opt @@ -213,7 +211,7 @@ class IntelItaniumVisualFCompiler(IntelVisualFCompiler): ar_exe = IntelVisualFCompiler.ar_exe executables = { - 'version_cmd' : ['<F77>', None], + 'version_cmd' : None, 'compiler_f77' : [None,"-FI","-w90","-w95"], 'compiler_fix' : [None,"-FI","-4L72","-w"], 'compiler_f90' : [None], |