-
Notifications
You must be signed in to change notification settings - Fork 23
/
tundra.lua
60 lines (54 loc) · 1.27 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
local common = {
Env = {
CCOPTS = {
-- clang and GCC
{ "-g"; Config = { "*-gcc-debug", "*-clang-debug" } },
{ "-g -O2"; Config = { "*-gcc-production", "*-clang-production" } },
{ "-O3"; Config = { "*-gcc-release", "*-clang-release" } },
{ "-Wall", "-Werror", "-Wextra", "-Wno-unused-parameter", "-Wno-unused-function"
; Config = { "*-gcc-*", "*-clang-*" }
},
{ "/W4"; Config = { "*-msvc-*" } },
},
CPPDEFS = {
{ "NDEBUG"; Config = "*-*-release" },
},
},
}
Build {
Units = function ()
local demo = Program {
Name = "demo",
Sources = {
"DebugHeap.c",
"demo.c",
},
}
Default(demo)
end,
Configs = {
Config {
Name = "macosx-clang",
Inherit = common,
DefaultOnHost = "macosx",
Tools = { "clang-osx", },
},
Config {
Name = "linux-gcc",
Inherit = common,
DefaultOnHost = "linux",
Tools = { "gcc", },
},
Config {
Name = "win64-msvc",
Inherit = common,
DefaultOnHost = "windows",
Tools = { { "msvc-vs2012"; TargetArch = "x64" }, },
},
},
Variants = {
{ Name = "debug", Options = { GeneratePdb = true } },
{ Name = "release" },
},
DefaultVariant = "debug",
}