Merged in triton/premake-cs-fixes/cpp-framework (pull request #79)
Use the user specified target .NET framework for Managed C++ VS projects.
This commit is contained in:
commit
30d53ced1d
@ -119,6 +119,15 @@
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Write out the TargetFrameworkVersion property.
|
||||
--
|
||||
|
||||
function vc2010.targetFramework(prj)
|
||||
local framework = prj.framework or "4.0"
|
||||
_p(2,'<TargetFrameworkVersion>v%s</TargetFrameworkVersion>', framework)
|
||||
end
|
||||
|
||||
--
|
||||
-- Write out the Globals property group.
|
||||
--
|
||||
@ -146,7 +155,7 @@
|
||||
_p(2,'<Keyword>MakeFileProj</Keyword>')
|
||||
else
|
||||
if isManaged then
|
||||
_p(2,'<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>')
|
||||
vc2010.targetFramework(prj)
|
||||
_p(2,'<Keyword>ManagedCProj</Keyword>')
|
||||
else
|
||||
_p(2,'<Keyword>Win32Proj</Keyword>')
|
||||
|
@ -59,6 +59,25 @@
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Ensure custom target framework version correct for Managed C++ projects.
|
||||
--
|
||||
|
||||
function suite.frameworkVersionIsCorrect_onManagedC()
|
||||
flags { "Managed" }
|
||||
framework "4.5"
|
||||
prepare()
|
||||
test.capture [[
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{42B5DBC6-AE1F-903D-F75D-41E363076E92}</ProjectGuid>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<Keyword>ManagedCProj</Keyword>
|
||||
<RootNamespace>MyProject</RootNamespace>
|
||||
</PropertyGroup>
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Omit Keyword and RootNamespace for non-Windows projects.
|
||||
--
|
||||
|
Reference in New Issue
Block a user