Merge branch 'master' into dialect-xcode
This commit is contained in:
commit
d3d2fbb03d
@ -10,6 +10,7 @@ return {
|
||||
"cs2005/test_build_events.lua",
|
||||
"cs2005/test_common_props.lua",
|
||||
"cs2005/test_compiler_props.lua",
|
||||
"cs2005/test_no_warn.lua",
|
||||
"cs2005/test_debug_props.lua",
|
||||
"cs2005/test_files.lua",
|
||||
"cs2005/test_icon.lua",
|
||||
|
50
modules/vstudio/tests/cs2005/test_no_warn.lua
Normal file
50
modules/vstudio/tests/cs2005/test_no_warn.lua
Normal file
@ -0,0 +1,50 @@
|
||||
--
|
||||
-- tests/actions/vstudio/cs2005/test_no_warn.lua
|
||||
-- Validate generation of disabling warnings for Visual Studio 2010 and newer.
|
||||
-- Copyright (c) 2012-2015 Jason Perkins and the Premake project
|
||||
--
|
||||
|
||||
local p = premake
|
||||
local suite = test.declare("vstudio_cs2005_no_warn")
|
||||
local dn2005 = p.vstudio.dotnetbase
|
||||
local project = p.project
|
||||
|
||||
|
||||
--
|
||||
-- Setup and teardown
|
||||
--
|
||||
|
||||
local wks, prj
|
||||
|
||||
function suite.setup()
|
||||
p.action.set("vs2010")
|
||||
wks, prj = test.createWorkspace()
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
local cfg = test.getconfig(prj, "Debug")
|
||||
dn2005.NoWarn
|
||||
(cfg)
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- If no disableWarnings are specified, nothing should be written.
|
||||
--
|
||||
|
||||
function suite.noOutput_onNoDisableWarnings()
|
||||
prepare()
|
||||
test.isemptycapture()
|
||||
end
|
||||
|
||||
--
|
||||
-- Handling of disableWarnings
|
||||
--
|
||||
|
||||
function suite.output_onDisableWarnings()
|
||||
disablewarnings { "1018", "1019" }
|
||||
prepare()
|
||||
test.capture [[
|
||||
<NoWarn>1018;1019</NoWarn>
|
||||
]]
|
||||
end
|
@ -53,7 +53,8 @@
|
||||
dotnetbase.propertyGroup,
|
||||
dotnetbase.debugProps,
|
||||
dotnetbase.outputProps,
|
||||
dotnetbase.compilerProps
|
||||
dotnetbase.compilerProps,
|
||||
dotnetbase.NoWarn
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -648,6 +648,14 @@
|
||||
end
|
||||
|
||||
|
||||
function dotnetbase.NoWarn(cfg)
|
||||
if #cfg.disablewarnings > 0 then
|
||||
local warnings = table.concat(cfg.disablewarnings, ";")
|
||||
_p(2,'<NoWarn>%s</NoWarn>', warnings)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function dotnetbase.targetFrameworkVersion(cfg)
|
||||
local action = p.action.current()
|
||||
local framework = cfg.dotnetframework or action.vstudio.targetFramework
|
||||
|
@ -52,6 +52,7 @@
|
||||
dotnetbase.debugProps,
|
||||
dotnetbase.outputProps,
|
||||
dotnetbase.compilerProps,
|
||||
dotnetbase.NoWarn,
|
||||
fs2005.tailCalls
|
||||
}
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user