-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.nims
63 lines (47 loc) · 1.65 KB
/
config.nims
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
switch("styleCheck", "hint")
--path:"$nim" ## important for nimscripter
--gc:orc
# --gc:arc
--d:windyNoHttp
--d:printDebugTimings
--d:nimStrictDelete
--hint:"ConvFromXtoItselfNotNeeded:off"
if not defined(emscripten):
--threads:on
import os
if defined(emscripten):
# This path will only run if -d:emscripten is passed to nim.
--nimcache:tmp # Store intermediate files close by in the ./tmp dir.
--os:linux # Emscripten pretends to be linux.
--cpu:i386 # Emscripten is 32bits.
--cc:clang # Emscripten is very close to clang, so we ill replace it.
--clang.exe:emcc.bat # Replace C
--clang.linkerexe:emcc.bat # Replace C linker
--clang.cpp.exe:emcc.bat # Replace C++
--clang.cpp.linkerexe:emcc.bat # Replace C++ linker.
--listCmd # List what commands we are running so that we can debug them.
--gc:arc # GC:arc is friendlier with crazy platforms.
--exceptions:goto # Goto exceptions are friendlier with crazy platforms.
--d:noSignalHandler
# Pass this to Emscripten linker to generate html file scaffold for us.
# switch("passL", "-o wasm.html")
# #switch("--preload-file data")
# switch("--shell-file src/shell_minimal.html")
elif defined(macosx):
# --d:pixieNoSimd
--d:kqueueUserEvent
--threads:on
# --passC:"-mfloat-abi=hard"
import std/os
import std/strutils
task test, "compile tests":
# unit tests
for (k, f) in walkDir("tests/unittests/"):
if k != pcDir and f.startsWith("t") and f.endsWith(".nim"):
# echo "F: ", f
exec "nim c -r " & f
# test compile widgets
for (k, f) in walkDir("tests"):
if k != pcDir and f.startsWith("t") and f.endsWith(".nim"):
# echo "F: ", f
exec "nim c " & f