Added /Wall to possible warning levels for Visual Studio

The 'warnings' keyword now accepts a value of 'High' to generate the /W4 MSVC compiler flag as well as 'Extra' to generate the /Wall flag.
This commit is contained in:
Ethan Wallace 2020-05-15 15:01:29 -04:00
parent 09dbfca63f
commit ae26a6f41f
3 changed files with 4 additions and 4 deletions

View File

@ -2714,13 +2714,13 @@
function m.warningLevel(cfg)
local map = { Off = "TurnOffAllWarnings", Extra = "Level4" }
local map = { Off = "TurnOffAllWarnings", High = "Level4", Extra = "EnableAllWarnings" }
m.element("WarningLevel", nil, map[cfg.warnings] or "Level3")
end
function m.warningLevelFile(cfg, condition)
local map = { Off = "TurnOffAllWarnings", Extra = "Level4" }
local map = { Off = "TurnOffAllWarnings", High = "Level4", Extra = "EnableAllWarnings" }
if cfg.warnings then
m.element("WarningLevel", condition, map[cfg.warnings] or "Level3")
end

View File

@ -80,7 +80,7 @@
["SSE4.1"] = "/arch:SSE2",
},
warnings = {
Extra = "/W4",
Extra = "/Wall",
High = "/W4",
Off = "/W0",
},

View File

@ -221,7 +221,7 @@
function suite.cflags_OnExtraWarnings()
warnings "Extra"
prepare()
test.contains("/W4", msc.getcflags(cfg))
test.contains("/Wall", msc.getcflags(cfg))
end
function suite.cflags_OnFatalWarnings()