Skip to content

Commit

Permalink
Merge pull request #1439 from withmorten/master
Browse files Browse the repository at this point in the history
Disable XP deprecation warning for Visual Studio projects
  • Loading branch information
starkos committed May 1, 2020
2 parents 5d0b64c + df58fd9 commit 09dbfca
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
36 changes: 36 additions & 0 deletions modules/vstudio/tests/vc2010/test_globals.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 9 additions & 0 deletions modules/vstudio/vs2010_vcxproj.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
m.elements.globalsCondition = function(prj, cfg)
return {
m.windowsTargetPlatformVersion,
m.xpDeprecationWarning,
}
end

Expand Down Expand Up @@ -2411,6 +2412,7 @@
end
end


function m.projectGuid(prj)
m.element("ProjectGuid", nil, "{%s}", prj.uuid)
end
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 09dbfca

Please sign in to comment.