Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test_mfc.lua « vc200x « vstudio « actions « tests - github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ea0671ec4e08df1495576fdf004eb340aaf829f5 (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
--
-- tests/actions/vstudio/vc200x/test_mfc.lua
-- Validate 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