annotate config.nims @ 18:90e117952f74

add: basic vertex buffer functionality
author Sam <sam@basx.dev>
date Thu, 05 Jan 2023 01:16:48 +0700
parents a571db114152
children b55d6ecde79d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
1 import os
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
2
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
3 const buildbase = "build"
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
4
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
5 proc compilerFlags() =
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
6 switch("path", "src")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
7 switch("mm", "orc")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
8 switch("experimental", "strictEffects")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
9 switch("threads", "on")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
10 switch("app", "gui")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
11
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
12 proc compilerFlagsDebug() =
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
13 switch("debugger", "native")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
14 switch("checks", "on")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
15 switch("assertions", "on")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
16
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
17 proc compilerFlagsRelease() =
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
18 switch("define", "release")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
19 switch("checks", "off")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
20 switch("assertions", "off")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
21
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
22 task build_linux_debug, "build linux debug":
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
23 compilerFlags()
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
24 compilerFlagsDebug()
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
25 buildbase.joinPath("debug/linux").mkDir()
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
26 setCommand "c"
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
27
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
28 task build_linux_release, "build linux release":
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
29 compilerFlags()
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
30 compilerFlagsRelease()
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
31 buildbase.joinPath("release/linux").mkDir()
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
32 setCommand "c"