Fix getting compiler via environment variable

pull/15/head
Jussi Pakkanen 12 years ago
parent bf62937711
commit 17e5d8c6ac
  1. 5
      environment.py

@ -528,13 +528,14 @@ class Environment():
def detect_c_compiler(self): def detect_c_compiler(self):
evar = 'CC' evar = 'CC'
if evar in os.environ: if evar in os.environ:
compilers = [os.environ[evar].split()] compilers = os.environ[evar].split()
ccache = [] ccache = []
else: else:
compilers = self.default_c compilers = self.default_c
ccache = self.detect_ccache() ccache = self.detect_ccache()
for compiler in compilers: for compiler in compilers:
try: try:
print(compiler)
basename = os.path.basename(compiler).lower() basename = os.path.basename(compiler).lower()
if basename == 'cl' or basename == 'cl.exe': if basename == 'cl' or basename == 'cl.exe':
arg = '/?' arg = '/?'
@ -567,7 +568,7 @@ class Environment():
def detect_cxx_compiler(self): def detect_cxx_compiler(self):
evar = 'CC' evar = 'CC'
if evar in os.environ: if evar in os.environ:
compilers = [os.environ[evar].split()] compilers = os.environ[evar].split()
ccache = [] ccache = []
else: else:
compilers = self.default_cxx compilers = self.default_cxx

Loading…
Cancel
Save