Commit 1b7de8c3 authored by Christian Stenger's avatar Christian Stenger

Squish: Fix detection of clang++ on Mac

Change-Id: I02f68f7942a3774c686e1482d275e22a6037af2a
Reviewed-by: default avatarRobert Loehning <robert.loehning@digia.com>
parent 87abfc36
......@@ -163,11 +163,15 @@ def __getExpectedCompilers__():
compilers = ["g++"]
if platform.system() in ('Linux', 'Darwin'):
compilers.extend(["g++-4.0", "g++-4.2", "clang++"])
if platform.system() == 'Darwin':
xcodeClang = getOutputFromCmdline("xcrun --find clang++").strip("\n")
if xcodeClang and os.path.exists(xcodeClang) and xcodeClang not in expected:
expected.append(xcodeClang)
for compiler in compilers:
compilerPath = which(compiler)
if compilerPath:
if compiler == 'clang++':
if subprocess.call(['clang++', '-dumpmachine']) != 0:
if compiler.endswith('clang++'):
if subprocess.call([compiler, '-dumpmachine']) != 0:
test.warning("clang found in PATH, but version is not supported.")
continue
expected.append(compilerPath)
......
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