-
Notifications
You must be signed in to change notification settings - Fork 5
/
synthesis.nimble
29 lines (22 loc) · 984 Bytes
/
synthesis.nimble
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
# Package
version = "0.2.0"
author = "Mamy André-Ratsimbazafy"
description = "A compile-time, compact, fast, without allocation, state-machine generator."
license = "MIT or Apache License 2.0"
# Dependencies
requires "nim >= 1.0.4"
proc test(flags, path: string) =
if not dirExists "build":
mkDir "build"
# Note: we compile in release mode. This still have stacktraces
# but is much faster than -d:debug
# Compilation language is controlled by TEST_LANG
var lang = "c"
if existsEnv"TEST_LANG":
lang = getEnv"TEST_LANG"
echo "\n========================================================================================"
echo "Running [ ", lang, " ", flags, " ] ", path
echo "========================================================================================"
exec "nim " & lang & " " & flags & " -d:release --outdir:build -r " & path
task test, "Run Synthesis tests":
test "", "examples/water_phase_transitions.nim"