diff options
author | Pearu Peterson <pearu.peterson@gmail.com> | 2005-11-03 08:47:42 +0000 |
---|---|---|
committer | Pearu Peterson <pearu.peterson@gmail.com> | 2005-11-03 08:47:42 +0000 |
commit | ba0c1639eea9308865cff70a91373b5d83c95f10 (patch) | |
tree | f575f060966973de2279b40efbc29e33e5bcdd15 | |
parent | 1514eef0c998d576ee954a02b3f4f4f46e53b1c1 (diff) | |
download | numpy-ba0c1639eea9308865cff70a91373b5d83c95f10.tar.gz |
Added Intel C Compiler class.
-rw-r--r-- | scipy/distutils/ccompiler.py | 7 | ||||
-rw-r--r-- | scipy/distutils/intelccompiler.py | 24 |
2 files changed, 31 insertions, 0 deletions
diff --git a/scipy/distutils/ccompiler.py b/scipy/distutils/ccompiler.py index e94189b2f..2e06e6993 100644 --- a/scipy/distutils/ccompiler.py +++ b/scipy/distutils/ccompiler.py @@ -223,6 +223,13 @@ def CCompiler_get_version(self, force=0, ok_status=[0]): CCompiler.get_version = new.instancemethod(\ CCompiler_get_version,None,CCompiler) +compiler_class['intel'] = ('intelccompiler','IntelCCompiler', + "Intel C Compiler for 32-bit applications") +compiler_class['intele'] = ('intelccompiler','IntelItaniumCCompiler', + "Intel C Itanium Compiler for Itanium-based applications") +ccompiler._default_compilers = ccompiler._default_compilers \ + + (('linux.*','intel'),('linux.*','intele')) + if sys.platform == 'win32': compiler_class['mingw32'] = ('mingw32ccompiler', 'Mingw32CCompiler', "Mingw32 port of GNU C Compiler for Win32"\ diff --git a/scipy/distutils/intelccompiler.py b/scipy/distutils/intelccompiler.py new file mode 100644 index 000000000..461074ba0 --- /dev/null +++ b/scipy/distutils/intelccompiler.py @@ -0,0 +1,24 @@ + +import os +from distutils.unixccompiler import UnixCCompiler +from scipy.distutils.exec_command import find_executable + +class IntelCCompiler(UnixCCompiler): + + """ A modified Intel compiler compatible with an gcc built Python. + """ + + compiler_type = 'intel' + cc_exe = 'icc' + + def __init__ (self, verbose=0, dry_run=0, force=0): + UnixCCompiler.__init__ (self, verbose,dry_run, force) + self.linker = self.cc_exe + self.set_executable(linker_so=self.linker + ' -shared') + +class IntelItaniumCompiler(IntelCCompiler): + compiler_type = 'intele' + + for cc_exe in map(find_executable,['ecc','icc']): + if os.path.isfile(cc_exe): + break |