nim-secp256k1/secp256k1.nimble

37 lines
1.2 KiB
Plaintext
Raw Normal View History

2018-01-05 01:02:25 +00:00
mode = ScriptMode.Verbose
packageName = "secp256k1"
version = "0.6.0.3.1"
2018-02-27 17:50:01 +00:00
author = "Status Research & Development GmbH"
2018-01-05 01:02:25 +00:00
description = "A wrapper for the libsecp256k1 C library"
2018-02-27 17:50:01 +00:00
license = "Apache License 2.0"
skipDirs = @["tests"]
installDirs = @["vendor"]
2018-01-05 01:02:25 +00:00
requires "nim >= 1.2.0",
"stew",
"nimcrypto"
2018-03-28 10:56:26 +00:00
let nimc = getEnv("NIMC", "nim") # Which nim compiler to use
let lang = getEnv("NIMLANG", "c") # Which backend (c/cpp/js)
let flags = getEnv("NIMFLAGS", "") # Extra flags for the compiler
let verbose = getEnv("V", "") notin ["", "0"]
let styleCheckStyle = if (NimMajor, NimMinor) < (1, 6): "hint" else: "error"
let cfg =
" --styleCheck:usages --styleCheck:" & styleCheckStyle &
(if verbose: "" else: " --verbosity:0 --hints:off") &
" --skipParentCfg --skipUserCfg --outdir:build --nimcache:build/nimcache -f"
proc build(args, path: string) =
exec nimc & " " & lang & " " & cfg & " " & flags & " " & args & " " & path
proc run(args, path: string) =
build args & " -r", path
2023-04-13 23:09:33 +00:00
if (NimMajor, NimMinor) > (1, 6):
build args & " --mm:refc -r", path
2018-03-28 10:56:26 +00:00
2020-04-17 05:43:30 +00:00
task test, "Tests":
run "--threads:on", "tests/all_tests"
run "--threads:off", "tests/all_tests"