diff --git a/numpy/distutils/ccompiler.py b/numpy/distutils/ccompiler.py index b5970d76fe0..ad235ed1997 100644 --- a/numpy/distutils/ccompiler.py +++ b/numpy/distutils/ccompiler.py @@ -385,10 +385,11 @@ def CCompiler_customize(self, dist, need_cxx=0): a, b = 'cc', 'c++' self.compiler_cxx = [self.compiler[0].replace(a, b)]\ + self.compiler[1:] - elif not self.compiler_cxx: + else: if hasattr(self, 'compiler'): log.warn("#### %s #######" % (self.compiler,)) - log.warn('Missing compiler_cxx fix for '+self.__class__.__name__) + if not hasattr(self, 'compiler_cxx'): + log.warn('Missing compiler_cxx fix for ' + self.__class__.__name__) return replace_method(CCompiler, 'customize', CCompiler_customize)