Fix building with clang 6

Annoyingly, clang 6 produces warnings for unused private static data
members, but does not recognise the [[maybe_unused]] attribute for them.
This commit is contained in:
Vas Crabb 2021-03-29 04:30:37 +11:00
parent 678cd3c921
commit 438edcd151

View File

@ -1086,6 +1086,12 @@ end
"-Wno-unknown-warning-option",
"-Wno-unused-value",
}
if (version < 70000) or ((version < 100001) and (_OPTIONS["targetos"] == 'macosx')) then
buildoptions { -- clang 6.0 complains that [[maybe_unused]] is ignored for static data members
"-Wno-error=ignored-attributes",
"-Wno-error=unused-const-variable",
}
end
if ((version >= 100000) and (_OPTIONS["targetos"] ~= 'macosx')) or (version >= 120000) then
buildoptions {
"-Wno-xor-used-as-pow", -- clang 10.0 complains that expressions like 10 ^ 7 look like exponention