blob: cf0a54a6e54f23ca4143c6e3fb28cd19ee61520a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
--
-- tests/actions/vstudio/vc200x/test_mfc.lua
-- Validate ATL/MFC support in Visual Studio 200x C/C++ projects.
-- Copyright (c) 2011 Jason Perkins and the Premake project
--
T.vstudio_vs200x_mfc = { }
local suite = T.vstudio_vs200x_mfc
local vc200x = premake.vstudio.vc200x
--
-- Setup
--
local sln, prj, cfg
function suite.setup()
_ACTION = "vs2008"
sln, prj = test.createsolution()
end
local function prepare(platform)
premake.bake.buildconfigs()
sln.vstudio_configs = premake.vstudio.buildconfigs(sln)
cfg = premake.getconfig(prj, "Debug", platform)
vc200x.Configuration("Debug|Win32", cfg)
end
--
-- When MFC is enabled, it should match the runtime library linking
-- method (static or dynamic).
--
function suite.useOfMfc_isDynamic_onSharedRuntime()
flags { "MFC" }
prepare()
test.capture [[
<Configuration
Name="Debug|Win32"
OutputDirectory="."
IntermediateDirectory="obj\Debug"
ConfigurationType="1"
UseOfMFC="2"
CharacterSet="2"
>
]]
end
function suite.useOfMfc_isStatic_onStaticRuntime()
flags { "MFC", "StaticRuntime" }
prepare()
test.capture [[
<Configuration
Name="Debug|Win32"
OutputDirectory="."
IntermediateDirectory="obj\Debug"
ConfigurationType="1"
UseOfMFC="1"
CharacterSet="2"
>
]]
end
--
-- Same as above for ATL.
--
function suite.useOfAtl_isDynamic_onSharedRuntime()
flags { "ATL" }
prepare()
test.capture [[
<Configuration
Name="Debug|Win32"
OutputDirectory="."
IntermediateDirectory="obj\Debug"
ConfigurationType="1"
UseOfATL="2"
CharacterSet="2"
>
]]
end
function suite.useOfAtl_isStatic_onStaticRuntime()
flags { "StaticATL" }
prepare()
test.capture [[
<Configuration
Name="Debug|Win32"
OutputDirectory="."
IntermediateDirectory="obj\Debug"
ConfigurationType="1"
UseOfATL="1"
CharacterSet="2"
>
]]
end
|