479
|
1 import os
|
|
2
|
|
3 const buildbase = "build"
|
|
4
|
|
5 proc compilerFlags() =
|
|
6 switch("path", "src")
|
|
7 switch("mm", "orc")
|
|
8 switch("experimental", "strictEffects")
|
|
9 switch("threads", "on")
|
|
10 switch("app", "gui")
|
|
11
|
|
12 proc compilerFlagsDebug() =
|
|
13 switch("debugger", "native")
|
|
14 switch("checks", "on")
|
|
15 switch("assertions", "on")
|
|
16
|
|
17 proc compilerFlagsRelease() =
|
|
18 switch("define", "release")
|
|
19 switch("checks", "off")
|
|
20 switch("assertions", "off")
|
|
21
|
|
22 task build_linux_debug, "build linux debug":
|
|
23 compilerFlags()
|
|
24 compilerFlagsDebug()
|
|
25 buildbase.joinPath("debug/linux").mkDir()
|
|
26 setCommand "c"
|
|
27
|
|
28 task build_linux_release, "build linux release":
|
|
29 compilerFlags()
|
|
30 compilerFlagsRelease()
|
|
31 buildbase.joinPath("release/linux").mkDir()
|
|
32 setCommand "c"
|