Fix undefined variables in ObjC/C++ detection

Pointed out by Mike Sinkovsky
pull/763/merge
Nirbheek Chauhan 8 years ago committed by Jussi Pakkanen
parent 7cece438cc
commit 4f0e204c34
  1. 14
      mesonbuild/environment.py

@ -511,10 +511,11 @@ class Environment:
for compiler in compilers:
if isinstance(compiler, str):
compiler = [compiler]
arg = ['--version']
try:
p, out, err = Popen_safe(compiler + ['--version'])
except OSError:
popen_exceptions[' '.join(compiler + [arg])] = e
p, out, err = Popen_safe(compiler + arg)
except OSError as e:
popen_exceptions[' '.join(compiler + arg)] = e
version = search_version(out)
if 'Free Software Foundation' in out:
defines = self.get_gnu_compiler_defines(compiler)
@ -536,10 +537,11 @@ class Environment:
for compiler in compilers:
if isinstance(compiler, str):
compiler = [compiler]
arg = ['--version']
try:
p, out, err = Popen_safe(compiler + ['--version'])
except OSError:
popen_exceptions[' '.join(compiler + [arg])] = e
p, out, err = Popen_safe(compiler + arg)
except OSError as e:
popen_exceptions[' '.join(compiler + arg)] = e
version = search_version(out)
if 'Free Software Foundation' in out:
defines = self.get_gnu_compiler_defines(compiler)

Loading…
Cancel
Save