Revert ToolVersion change on VC 2013 .filters files to match VS

This commit is contained in:
Jason Perkins 2015-01-12 17:17:56 -05:00
parent 623c5d3d79
commit 98ab499f13
5 changed files with 39 additions and 32 deletions

View File

@ -48,7 +48,7 @@
function m.generate(prj)
io.utf8()
m.xmlDeclaration()
m.project("Build")
m.project()
p.callArray(m.elements.project, prj)
p.out('</Project>')
end
@ -59,16 +59,10 @@
-- Output the XML declaration and opening <Project> tag.
--
function m.project(target)
local default = ""
if target then
default = string.format(' DefaultTargets="%s"', target)
end
function m.project()
local action = premake.action.current()
local tools = string.format(' ToolsVersion="%s"', action.vstudio.toolsVersion)
p.push('<Project%s%s xmlns="http://schemas.microsoft.com/developer/msbuild/2003">', default, tools)
p.push('<Project DefaultTargets="Build" ToolsVersion="%s" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">',
action.vstudio.toolsVersion)
end

View File

@ -17,13 +17,24 @@
function m.generateFilters(prj)
m.xmlDeclaration()
m.project()
m.filtersProject()
m.uniqueIdentifiers(prj)
m.filterGroups(prj)
p.out('</Project>')
end
--
-- Output the XML declaration and opening <Project> tag.
--
function m.filtersProject()
local action = premake.action.current()
p.push('<Project ToolsVersion="%s" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">',
action.vstudio.filterToolsVersion or action.vstudio.toolsVersion)
end
m.elements.filterGroups = {
"None",

View File

@ -9,17 +9,19 @@
local vc2010 = p.vstudio.vc2010
local project = p.project
local m = p.vstudio.vc2010
--
-- Generate a Visual Studio 201x C++ user file, with support for the new platforms API.
--
function vc2010.generateUser(prj)
vc2010.xmlDeclaration()
vc2010.project()
function m.generateUser(prj)
m.xmlDeclaration()
m.userProject()
for cfg in project.eachconfig(prj) do
p.push('<PropertyGroup %s>', vc2010.condition(cfg))
vc2010.debugSettings(cfg)
p.push('<PropertyGroup %s>', m.condition(cfg))
m.debugSettings(cfg)
p.pop('</PropertyGroup>')
end
_p('</Project>')
@ -27,6 +29,18 @@
--
-- Output the XML declaration and opening <Project> tag.
--
function m.userProject()
local action = premake.action.current()
p.push('<Project ToolsVersion="%s" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">',
action.vstudio.toolsVersion)
end
vc2010.elements.debugSettings = function(cfg)
return {
vc2010.localDebuggerCommand,

View File

@ -53,5 +53,6 @@
versionName = "2013",
targetFramework = "4.5",
toolsVersion = "12.0",
filterToolsVersion = "4.0",
}
}

View File

@ -15,7 +15,7 @@
function suite.project_on2010()
_ACTION = "vs2010"
vc2010.project("Build")
vc2010.project()
test.capture [[
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
]]
@ -23,7 +23,7 @@
function suite.project_on2011()
_ACTION = "vs2012"
vc2010.project("Build")
vc2010.project()
test.capture [[
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
]]
@ -31,21 +31,8 @@
function suite.project_on2013()
_ACTION = "vs2013"
vc2010.project("Build")
vc2010.project()
test.capture [[
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
]]
end
--
-- If no build target is specified, the entire attribute should be omitted.
--
function suite.project_onNoDefaultTarget()
_ACTION = "vs2010"
vc2010.project()
test.capture [[
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
]]
end