Commit aa5b7c2f authored by Mark Florisson's avatar Mark Florisson

Don't fail if the C compiler is not found

parent acfbf762
......@@ -112,11 +112,23 @@ def get_openmp_compiler_flags(language):
try:
import subprocess
except ImportError:
in_, out, err = os.popen(cc = " -v")
try:
in_, out, err = os.popen(cc + " -v")
except EnvironmentError, e:
warnings.warn("Unable to find the %s compiler: %s: %s" %
(language, os.strerror(e.errno), cc))
return None
output = out.read() or err.read()
else:
p = subprocess.Popen([cc, "-v"], stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
try:
p = subprocess.Popen([cc, "-v"], stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
except EnvironmentError, e:
warnings.warn("Unable to find the %s compiler: %s: %s" %
(language, os.strerror(e.errno), cc))
return None
output = p.stdout.read()
compiler_version = matcher(output).group(1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment