[core] Add High as a new warning level

Maps to /W4 on VS and -Wall for gcc/clang removing -Wextra
This commit is contained in:
Patrick Doane 2017-06-28 15:26:56 -07:00 committed by Tom van Dijck
parent 5ecd0a3102
commit e49b404d73
5 changed files with 15 additions and 0 deletions

View File

@ -1250,6 +1250,7 @@
allowed = { allowed = {
"Off", "Off",
"Default", "Default",
"High",
"Extra", "Extra",
} }
} }

View File

@ -78,6 +78,7 @@
}, },
warnings = { warnings = {
Extra = "-Wall -Wextra", Extra = "-Wall -Wextra",
High = "-Wall",
Off = "-w", Off = "-w",
}, },
symbols = { symbols = {

View File

@ -84,6 +84,7 @@
}, },
warnings = { warnings = {
Extra = "/W4", Extra = "/W4",
High = "/W4",
Off = "/W0", Off = "/W0",
}, },
stringpooling = { stringpooling = {

View File

@ -80,6 +80,12 @@
test.contains({ "-Wall -Wextra" }, gcc.getcflags(cfg)) test.contains({ "-Wall -Wextra" }, gcc.getcflags(cfg))
end end
function suite.cflags_onHighWarnings()
warnings "high"
prepare()
test.contains({ "-Wall" }, gcc.getcflags(cfg))
end
function suite.cflags_onFatalWarnings() function suite.cflags_onFatalWarnings()
flags { "FatalWarnings" } flags { "FatalWarnings" }
prepare() prepare()

View File

@ -181,6 +181,12 @@
test.contains("/W0", msc.getcflags(cfg)) test.contains("/W0", msc.getcflags(cfg))
end end
function suite.cflags_OnHighWarnings()
warnings "High"
prepare()
test.contains("/W4", msc.getcflags(cfg))
end
function suite.cflags_OnExtraWarnings() function suite.cflags_OnExtraWarnings()
warnings "Extra" warnings "Extra"
prepare() prepare()