at master 1.5 kB view raw
1diff --git a/numpy/distutils/unixccompiler.py b/numpy/distutils/unixccompiler.py 2--- a/numpy/distutils/unixccompiler.py 3+++ b/numpy/distutils/unixccompiler.py 4@@ -37,8 +37,6 @@ def UnixCCompiler__compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts 5 if opt not in llink_s: 6 self.linker_so = llink_s.split() + opt.split() 7 8- display = '%s: %s' % (os.path.basename(self.compiler_so[0]), src) 9- 10 # gcc style automatic dependencies, outputs a makefile (-MF) that lists 11 # all headers needed by a c file as a side effect of compilation (-MMD) 12 if getattr(self, '_auto_depends', False): 13@@ -47,8 +45,15 @@ def UnixCCompiler__compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts 14 deps = [] 15 16 try: 17- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + deps + 18- extra_postargs, display = display) 19+ if self.detect_language(src) == 'c++': 20+ display = '%s: %s' % (os.path.basename(self.compiler_so_cxx[0]), src) 21+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] + deps + 22+ extra_postargs, display = display) 23+ else: 24+ display = '%s: %s' % (os.path.basename(self.compiler_so[0]), src) 25+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + deps + 26+ extra_postargs, display = display) 27+ 28 except DistutilsExecError as e: 29 msg = str(e) 30 raise CompileError(msg)