fix configure macOS cpp finding (#1070)

This commit is contained in:
Alex Bates 2023-06-27 00:00:58 +01:00 committed by GitHub
parent 80aa54dd53
commit 6257881b44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1134,9 +1134,12 @@ if __name__ == "__main__":
):
gcc_cpps = ("cpp-14", "cpp-13", "cpp-12", "cpp-11")
for ver in gcc_cpps:
if "Free Software Foundation" in exec_shell([ver, "--version"]):
args.cpp = ver
break
try:
if "Free Software Foundation" in exec_shell([ver, "--version"]):
args.cpp = ver
break
except FileNotFoundError:
pass
if args.cpp is None:
print("error: system C preprocessor is not GNU!")
print(