2012-01-27 01:40:39 +00:00
|
|
|
--
|
|
|
|
-- tests/actions/vstudio/vc2010/test_project_configs.lua
|
|
|
|
-- Test the Visual Studio 2010 project configurations item group.
|
|
|
|
-- Copyright (c) 2009-2012 Jason Perkins and the Premake project
|
|
|
|
--
|
|
|
|
|
|
|
|
T.vstudio_vc2010_project_configs = { }
|
|
|
|
local suite = T.vstudio_vc2010_project_configs
|
|
|
|
local vc2010 = premake.vstudio.vc2010
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Setup
|
|
|
|
--
|
|
|
|
|
|
|
|
local sln, prj
|
|
|
|
|
|
|
|
function suite.setup()
|
|
|
|
_ACTION = "vs2010"
|
2012-02-19 17:31:20 +00:00
|
|
|
sln = test.createsolution()
|
2012-01-27 01:40:39 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
local function prepare()
|
2012-02-19 17:31:20 +00:00
|
|
|
prj = premake.solution.getproject_ng(sln, 1)
|
2012-01-27 01:40:39 +00:00
|
|
|
vc2010.projectConfigurations(prj)
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- If no architectures are specified, Win32 should be the default.
|
|
|
|
--
|
|
|
|
|
|
|
|
function suite.win32Listed_onNoPlatforms()
|
|
|
|
prepare()
|
|
|
|
test.capture [[
|
|
|
|
<ItemGroup Label="ProjectConfigurations">
|
|
|
|
<ProjectConfiguration Include="Debug|Win32">
|
|
|
|
<Configuration>Debug</Configuration>
|
|
|
|
<Platform>Win32</Platform>
|
|
|
|
</ProjectConfiguration>
|
|
|
|
<ProjectConfiguration Include="Release|Win32">
|
|
|
|
<Configuration>Release</Configuration>
|
|
|
|
<Platform>Win32</Platform>
|
|
|
|
</ProjectConfiguration>
|
2012-01-27 21:29:41 +00:00
|
|
|
</ItemGroup>
|
2012-01-27 01:40:39 +00:00
|
|
|
]]
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2012-11-19 20:47:59 +00:00
|
|
|
-- Visual Studio requires that all combinations of configurations and
|
|
|
|
-- architectures be listed (even if some pairings would make no sense
|
|
|
|
-- for our build, i.e. Win32 DLL DCRT|PS3).
|
2012-01-27 01:40:39 +00:00
|
|
|
--
|
|
|
|
|
|
|
|
function suite.allArchitecturesListed_onMultipleArchitectures()
|
2012-11-17 20:49:06 +00:00
|
|
|
platforms { "32b", "64b" }
|
|
|
|
configuration "32b"
|
|
|
|
architecture "x32"
|
|
|
|
configuration "64b"
|
|
|
|
architecture "x64"
|
2012-01-27 01:40:39 +00:00
|
|
|
prepare()
|
|
|
|
test.capture [[
|
|
|
|
<ItemGroup Label="ProjectConfigurations">
|
2012-11-17 20:49:06 +00:00
|
|
|
<ProjectConfiguration Include="Debug 32b|Win32">
|
|
|
|
<Configuration>Debug 32b</Configuration>
|
|
|
|
<Platform>Win32</Platform>
|
|
|
|
</ProjectConfiguration>
|
|
|
|
<ProjectConfiguration Include="Debug 32b|x64">
|
|
|
|
<Configuration>Debug 32b</Configuration>
|
|
|
|
<Platform>x64</Platform>
|
|
|
|
</ProjectConfiguration>
|
|
|
|
<ProjectConfiguration Include="Debug 64b|Win32">
|
|
|
|
<Configuration>Debug 64b</Configuration>
|
2012-01-27 01:40:39 +00:00
|
|
|
<Platform>Win32</Platform>
|
|
|
|
</ProjectConfiguration>
|
2012-11-17 20:49:06 +00:00
|
|
|
<ProjectConfiguration Include="Debug 64b|x64">
|
|
|
|
<Configuration>Debug 64b</Configuration>
|
2012-05-23 18:28:14 +00:00
|
|
|
<Platform>x64</Platform>
|
2012-05-15 23:06:03 +00:00
|
|
|
</ProjectConfiguration>
|
2012-11-17 20:49:06 +00:00
|
|
|
<ProjectConfiguration Include="Release 32b|Win32">
|
|
|
|
]]
|
|
|
|
end
|
|
|
|
|
2012-11-19 20:47:59 +00:00
|
|
|
|
|
|
|
--
|
|
|
|
-- Sometimes unrolling the configuration-architecture combinations
|
|
|
|
-- can cause duplicates. Make sure those get removed.
|
|
|
|
--
|
|
|
|
|
2012-11-17 20:49:06 +00:00
|
|
|
function suite.allArchitecturesListed_onImplicitArchitectures()
|
|
|
|
platforms { "x32", "x64" }
|
|
|
|
prepare()
|
|
|
|
test.capture [[
|
|
|
|
<ItemGroup Label="ProjectConfigurations">
|
|
|
|
<ProjectConfiguration Include="Debug|Win32">
|
|
|
|
<Configuration>Debug</Configuration>
|
2012-05-23 18:28:14 +00:00
|
|
|
<Platform>Win32</Platform>
|
2012-05-15 23:06:03 +00:00
|
|
|
</ProjectConfiguration>
|
2012-11-17 20:49:06 +00:00
|
|
|
<ProjectConfiguration Include="Debug|x64">
|
|
|
|
<Configuration>Debug</Configuration>
|
2012-01-27 01:40:39 +00:00
|
|
|
<Platform>x64</Platform>
|
|
|
|
</ProjectConfiguration>
|
2012-11-17 20:49:06 +00:00
|
|
|
<ProjectConfiguration Include="Release|Win32">
|
2012-01-27 01:40:39 +00:00
|
|
|
]]
|
|
|
|
end
|