Allow premake5 --cc argument to be optional

This commit is contained in:
David Hummel 2025-07-08 20:46:11 -07:00
parent 0f804c3690
commit 40d073e13e
1 changed files with 2 additions and 2 deletions

View File

@ -159,8 +159,8 @@ filter({"platforms:Linux", "language:C++", "toolset:clang"})
"deprecated-enum-enum-conversion",
"attributes",
})
if os.istarget("linux") and string.contains(_OPTIONS["cc"], "clang") then
CLANG_BIN = os.getenv("CC") or _OPTIONS["cc"]
CLANG_BIN = os.getenv("CC") or _OPTIONS["cc"] or "clang"
if os.istarget("linux") and string.contains(CLANG_BIN, "clang") then
if tonumber(string.match(os.outputof(CLANG_BIN.." --version"), "version (%d%d)")) >= 20 then
filter({"platforms:Linux", "language:C++", "toolset:clang"})
disablewarnings({