diff options
| author | Ganesh Viswanathan <dev@genotrance.com> | 2019-02-06 18:19:20 -0600 |
|---|---|---|
| committer | Ganesh Viswanathan <dev@genotrance.com> | 2019-02-06 18:19:20 -0600 |
| commit | 1251d9e200e46367353675d1caed4606126d38e5 (patch) | |
| tree | ccbde8747b1515f9c3c07af1bb757c4d2ce93861 | |
| parent | 7bc619e79dbe751c037c3d61983baed3a7bc64d9 (diff) | |
| download | nimterop-1251d9e200e46367353675d1caed4606126d38e5.tar.gz nimterop-1251d9e200e46367353675d1caed4606126d38e5.zip | |
Fix issue #90 based on PR #91
| -rw-r--r-- | nimterop.nimble | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/nimterop.nimble b/nimterop.nimble index 5f69daa..d0074ba 100644 --- a/nimterop.nimble +++ b/nimterop.nimble @@ -20,26 +20,27 @@ proc execCmd(cmd: string) = echo "execCmd:" & cmd exec cmd +proc execTest(test: string) = + execCmd "nim c -r " & test + execCmd "nim cpp -r " & test + proc tsoloud() = - execCmd "nim c -r tests/tsoloud.nim" - execCmd "nim cpp -r tests/tsoloud.nim" + execTest "tests/tsoloud.nim" -proc buildToast(options: string) = - execCmd(&"nim c {options} nimterop/toast.nim") +proc buildToast() = + execCmd(&"nim c -d:release nimterop/toast.nim") task rebuildToast, "rebuild toast": # If need to manually rebuild (automatically built on 1st need) - buildToast("-d:release") + buildToast() proc testAll() = - execCmd "nim c -r tests/tnimterop_c.nim" - execCmd "nim cpp -r tests/tnimterop_c.nim" + execTest "tests/tnimterop_c.nim" execCmd "nim cpp -r tests/tnimterop_cpp.nim" ## platform specific tests when defined(Windows): - execCmd "nim c -r tests/tmath.nim" - execCmd "nim cpp -r tests/tmath.nim" + execTest "tests/tmath.nim" if defined(OSX) or defined(Windows) or not existsEnv("TRAVIS"): tsoloud() # requires some libraries on linux, need them installed in TRAVIS @@ -49,9 +50,8 @@ proc runNimDoc() = execCmd &"nim doc -o:{htmldocsDir} --project --index:on nimterop/all.nim" task test, "Test": - for options in ["", "-d:release"]: - buildToast(options) - testAll() + buildToast() + testAll() runNimDoc() task docs, "Generate docs": |
