diff options
author | Jason Perkins <starkos@industriousone.com> | 2013-04-26 00:00:18 +0400 |
---|---|---|
committer | Jason Perkins <starkos@industriousone.com> | 2013-04-26 00:00:18 +0400 |
commit | e1478cbb172cfb7bcb6220d154fc6f12d5e04bc6 (patch) | |
tree | ac1391a6b995b9ecc7805a12171c6a109c5ec2f2 /tests/actions/vstudio/vc2010/test_config_props.lua | |
parent | 826b24e1b01d969ba7206b7e1b38176bf639649a (diff) |
Add support for Visual Studio 2012 (Oliver Schneider)
Diffstat (limited to 'tests/actions/vstudio/vc2010/test_config_props.lua')
-rw-r--r-- | tests/actions/vstudio/vc2010/test_config_props.lua | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/tests/actions/vstudio/vc2010/test_config_props.lua b/tests/actions/vstudio/vc2010/test_config_props.lua new file mode 100644 index 0000000..3aef357 --- /dev/null +++ b/tests/actions/vstudio/vc2010/test_config_props.lua @@ -0,0 +1,65 @@ +-- +-- tests/actions/vstudio/vc2010/test_config_props.lua +-- Validate generation of the configuration property group. +-- Copyright (c) 2011-2013 Jason Perkins and the Premake project +-- + + T.vstudio_vs2010_config_props = { } + local suite = T.vstudio_vs2010_config_props + local vc2010 = premake.vstudio.vc2010 + local project = premake.project + + +-- +-- Setup +-- + + local sln, prj + + function suite.setup() + sln, prj = test.createsolution() + end + + local function prepare(platform) + premake.bake.buildconfigs() + sln.vstudio_configs = premake.vstudio.buildconfigs(sln) + local cfginfo = sln.vstudio_configs[1] + local cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform) + vc2010.configurationPropertyGroup(cfg, cfginfo) + end + + +-- +-- Check the structure with the default project values. +-- + + function suite.structureIsCorrect_onDefaultValues() + prepare() + test.capture [[ + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + ]] + end + + + + +-- +-- Visual Studio 2012 adds a platform toolset. +-- + + function suite.structureIsCorrect_onDefaultValues() + _ACTION = "vs2012" + prepare() + test.capture [[ + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + ]] + end |