diff 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
line wrap: on
line diff
--- a/config.nims	Sun Jan 01 01:00:50 2023 +0700
+++ b/config.nims	Thu Jan 05 01:16:48 2023 +0700
@@ -1,1 +1,32 @@
-switch("path", "src")
+import os
+
+const buildbase = "build"
+
+proc compilerFlags() =
+  switch("path", "src")
+  switch("mm", "orc")
+  switch("experimental", "strictEffects")
+  switch("threads", "on")
+  switch("app", "gui")
+
+proc compilerFlagsDebug() =
+  switch("debugger", "native")
+  switch("checks", "on")
+  switch("assertions", "on")
+
+proc compilerFlagsRelease() =
+  switch("define", "release")
+  switch("checks", "off")
+  switch("assertions", "off")
+
+task build_linux_debug, "build linux debug":
+  compilerFlags()
+  compilerFlagsDebug()
+  buildbase.joinPath("debug/linux").mkDir()
+  setCommand "c"
+
+task build_linux_release, "build linux release":
+  compilerFlags()
+  compilerFlagsRelease()
+  buildbase.joinPath("release/linux").mkDir()
+  setCommand "c"