forked from qt-creator/qt-creator
Squish: Fix compiler detection
Find clang and clang++ in more than one location. If they could be found in more than a single path provided inside PATH we expected only the first occurrence. Change-Id: Ibcd7b7b6dff1153fd4b52b055c0fb2a0c5d9d7fc Reviewed-by: Robert Loehning <robert.loehning@qt.io>
This commit is contained in:
@@ -209,11 +209,9 @@ def __getExpectedCompilers__():
|
|||||||
expected.extend(__getWinCompilers__())
|
expected.extend(__getWinCompilers__())
|
||||||
compilers = ["g++", "gcc"]
|
compilers = ["g++", "gcc"]
|
||||||
if platform.system() in ('Linux', 'Darwin'):
|
if platform.system() in ('Linux', 'Darwin'):
|
||||||
compilers.extend(["clang++", "clang", "afl-clang"])
|
for c in ('clang++', 'clang', 'afl-clang', 'clang-[0-9]', 'clang-[0-9].[0-9]',
|
||||||
compilers.extend(findAllFilesInPATH("clang-[0-9]"))
|
'*g++*', '*gcc*'):
|
||||||
compilers.extend(findAllFilesInPATH("clang-[0-9].[0-9]"))
|
compilers.extend(findAllFilesInPATH(c))
|
||||||
compilers.extend(findAllFilesInPATH("*g++*"))
|
|
||||||
compilers.extend(findAllFilesInPATH("*gcc*"))
|
|
||||||
if platform.system() == 'Darwin':
|
if platform.system() == 'Darwin':
|
||||||
for compilerExe in ('clang++', 'clang'):
|
for compilerExe in ('clang++', 'clang'):
|
||||||
xcodeClang = getOutputFromCmdline(["xcrun", "--find", compilerExe]).strip("\n")
|
xcodeClang = getOutputFromCmdline(["xcrun", "--find", compilerExe]).strip("\n")
|
||||||
|
Reference in New Issue
Block a user