-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtundra.lua
109 lines (98 loc) · 2.73 KB
/
tundra.lua
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
99
100
101
102
103
104
105
106
107
108
109
native = require "tundra.native"
local win32_config = {
Env = {
DXSDK_DIR = native.getenv("DXSDK_DIR", "."),
CPPDEFS = { "SANDBOX_PLATFORM_WIN" },
CXXOPTS = {
"/WX", "/W4", "/EHsc", "/D_CRT_SECURE_NO_WARNINGS",
"/D_MBCS",
"/wd4512", -- C4512: assignment operator could not be generated.
"/wd28251", -- C28251: Inconsistent annotation for '*': this instance has no annotations.
"/wd4127", -- C4127: conditional expression is constant.
{
--"/analyze",
"/MDd",
"/Od";
Config = "*-*-debug"
},
{ "/MD", "/O2"; Config = {"*-*-release", "*-*-production"} },
},
GENERATE_PDB = {
{ "0"; Config = "*-vs2013-release" },
{ "1"; Config = { "*-vs2013-debug", "*-vs2013-production" } },
}
},
}
local macosx_config = {
Env = {
CPPDEFS = { "SANDBOX_PLATFORM_MACOSX" },
CXXOPTS = {
"-Werror", "-Wall", "-std=c++11",
{ "-O0", "-g"; Config = "*-*-debug" },
{ "-O2"; Config = {"*-*-release", "*-*-production"} },
},
LD = { "-lc++" },
}
}
Build {
Units = "units.lua",
Passes = {
SetupPass = { Name = "Setup Pass", BuildOrder = 1 },
CodeGeneration = { Name = "Code Generation", BuildOrder = 2 },
},
Configs = {
Config {
Name = "macosx-gcc",
Inherit = macosx_config,
DefaultOnHost = "macosx",
Tools = { "clang-osx" },
},
Config {
Name = "win64-vs2013",
Inherit = win32_config,
Tools = { { "msvc-vs2013"; TargetArch = "x64" }, },
SupportedHosts = { "windows" },
Env = {
CPPDEFS = { "SANDBOX_PLATFORM_WIN64" },
}
},
Config {
Name = "win32-vs2013",
Inherit = win32_config,
Tools = { { "msvc-vs2013"; TargetArch = "x86" }, },
DefaultOnHost = "windows",
},
},
Env = {
CPPDEFS = {
{ "_DEBUG"; Config = "*-*-debug" },
{ "SANDBOX_BUILD_DEBUG"; Config = "*-*-debug" },
{ "SANDBOX_BUILD_RELEASE"; Config = "*-*-release" },
{ "SANDBOX_BUILD_PRODUCTION"; Config = "*-*-production" },
{ "SANDBOX_DEVELOPMENT"; Config = {"*-*-debug", "*-*-production"} },
{ "SANDBOX_FILE_TRACKING"; Config = "*-*-debug" },
{ "SANDBOX_MEMORY_TRACKING"; Config = "*-*-debug" },
-- { "SANDBOX_VERBOSE_TRACKING"; Config = "*-*-debug" }
},
},
IdeGenerationHints = {
Msvc = {
-- Remap config names to MSVC platform names (affects things like header scanning & debugging)
PlatformMappings = {
['win64-vs2013'] = 'x64',
['win32-vs2013'] = 'Win32',
},
-- Remap variant names to MSVC friendly names
VariantMappings = {
['release'] = 'Release',
['debug'] = 'Debug',
['production'] = 'Production',
},
},
-- Override solutions to generate and what units to put where.
MsvcSolutions = {
['Sandbox.sln'] = {}, -- receives all the units due to empty set
},
BuildAllByDefault = true,
}
}