Merge pull request #1439 from withmorten/master

Disable XP deprecation warning for Visual Studio projects
This commit is contained in:
starkos 2020-05-01 10:17:08 -04:00 committed by GitHub
commit 09dbfca63f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 0 deletions

View File

@ -290,6 +290,42 @@ end
end
function suite.canSetXPDeprecationWarningToFalse_withV141XP()
toolset "v141_xp"
prepare()
test.capture [[
<PropertyGroup Label="Globals">
<ProjectGuid>{42B5DBC6-AE1F-903D-F75D-41E363076E92}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>MyProject</RootNamespace>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Globals">
<XPDeprecationWarning>false</XPDeprecationWarning>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Globals">
<XPDeprecationWarning>false</XPDeprecationWarning>
</PropertyGroup>
]]
end
function suite.canSetXPDeprecationWarningToFalse_perConfig_withV141XP()
filter "Release"
toolset "v141_xp"
prepare()
test.capture [[
<PropertyGroup Label="Globals">
<ProjectGuid>{42B5DBC6-AE1F-903D-F75D-41E363076E92}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>MyProject</RootNamespace>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Globals">
<XPDeprecationWarning>false</XPDeprecationWarning>
</PropertyGroup>
]]
end
function suite.windowsTargetPlatformVersion_latest_on2019()
p.action.set("vs2019")
systemversion "latest"

View File

@ -139,6 +139,7 @@
m.elements.globalsCondition = function(prj, cfg)
return {
m.windowsTargetPlatformVersion,
m.xpDeprecationWarning,
}
end
@ -2411,6 +2412,7 @@
end
end
function m.projectGuid(prj)
m.element("ProjectGuid", nil, "{%s}", prj.uuid)
end
@ -2622,6 +2624,13 @@
end
function m.xpDeprecationWarning(prj, cfg)
if cfg.toolset == "msc-v141_xp" then
m.element("XPDeprecationWarning", nil, "false")
end
end
function m.preferredToolArchitecture(prj)
if _ACTION >= "vs2013" then
if prj.preferredtoolarchitecture == p.X86_64 then