Enable enablewarnings() for MSC

This commit is contained in:
starkos 2020-04-06 18:01:36 -04:00
parent 4c11d6e123
commit ae5d93a1a8
2 changed files with 6 additions and 2 deletions

View File

@ -363,10 +363,14 @@
function msc.getwarnings(cfg)
local result = {}
-- NOTE: VStudio can't enable specific warnings (workaround?)
for _, enable in ipairs(cfg.enablewarnings) do
table.insert(result, '/w1"' .. enable .. '"')
end
for _, disable in ipairs(cfg.disablewarnings) do
table.insert(result, '/wd"' .. disable .. '"')
end
for _, fatal in ipairs(cfg.fatalwarnings) do
table.insert(result, '/we"' .. fatal .. '"')
end

View File

@ -235,7 +235,7 @@
disablewarnings { "disable" }
fatalwarnings { "fatal" }
prepare()
test.contains({ '/wd"disable"', '/we"fatal"' }, msc.getcflags(cfg))
test.contains({ '/w1"enable"', '/wd"disable"', '/we"fatal"' }, msc.getcflags(cfg))
end
function suite.ldflags_OnFatalWarnings()