Merge branch 'master' into dialect-xcode

This commit is contained in:
hsandt 2017-09-20 23:02:30 +02:00 committed by GitHub
commit d3d2fbb03d
5 changed files with 62 additions and 1 deletions

View File

@ -10,6 +10,7 @@ return {
"cs2005/test_build_events.lua", "cs2005/test_build_events.lua",
"cs2005/test_common_props.lua", "cs2005/test_common_props.lua",
"cs2005/test_compiler_props.lua", "cs2005/test_compiler_props.lua",
"cs2005/test_no_warn.lua",
"cs2005/test_debug_props.lua", "cs2005/test_debug_props.lua",
"cs2005/test_files.lua", "cs2005/test_files.lua",
"cs2005/test_icon.lua", "cs2005/test_icon.lua",

View 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

View File

@ -53,7 +53,8 @@
dotnetbase.propertyGroup, dotnetbase.propertyGroup,
dotnetbase.debugProps, dotnetbase.debugProps,
dotnetbase.outputProps, dotnetbase.outputProps,
dotnetbase.compilerProps dotnetbase.compilerProps,
dotnetbase.NoWarn
} }
end end

View File

@ -648,6 +648,14 @@
end 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) function dotnetbase.targetFrameworkVersion(cfg)
local action = p.action.current() local action = p.action.current()
local framework = cfg.dotnetframework or action.vstudio.targetFramework local framework = cfg.dotnetframework or action.vstudio.targetFramework

View File

@ -52,6 +52,7 @@
dotnetbase.debugProps, dotnetbase.debugProps,
dotnetbase.outputProps, dotnetbase.outputProps,
dotnetbase.compilerProps, dotnetbase.compilerProps,
dotnetbase.NoWarn,
fs2005.tailCalls fs2005.tailCalls
} }
end end