2023-07-11 15:19:45 -07:00
|
|
|
import std/os
|
|
|
|
|
|
|
|
const currentDir = currentSourcePath()[0 .. ^(len("config.nims") + 1)]
|
|
|
|
|
2022-07-05 12:12:49 +03:00
|
|
|
switch("define", "libp2p_pki_schemes=secp256k1")
|
2023-07-09 14:27:41 +03:00
|
|
|
|
2023-07-11 15:19:45 -07:00
|
|
|
task testAll, "Run DHT tests":
|
|
|
|
exec "nim c -r tests/testAll.nim"
|
|
|
|
|
|
|
|
task test, "Run DHT tests":
|
2023-07-12 15:39:12 -07:00
|
|
|
exec "nim c -r --verbosity:0 tests/testAllParallel.nim"
|
2023-07-11 15:19:45 -07:00
|
|
|
|
|
|
|
when getEnv("NIMBUS_BUILD_SYSTEM") == "yes" and
|
|
|
|
# BEWARE
|
|
|
|
# In Nim 1.6, config files are evaluated with a working directory
|
|
|
|
# matching where the Nim command was invocated. This means that we
|
|
|
|
# must do all file existance checks with full absolute paths:
|
|
|
|
system.fileExists(currentDir & "nimbus-build-system.paths"):
|
|
|
|
echo "Using Nimbus Paths"
|
|
|
|
include "nimbus-build-system.paths"
|
2023-07-12 19:00:12 -07:00
|
|
|
elif withDir(thisDir(), system.fileExists("nimble.paths")):
|
|
|
|
echo "Using Nimble Paths"
|
2023-07-12 18:58:31 -07:00
|
|
|
|
|
|
|
# begin Nimble config (version 2)
|
2023-07-12 19:00:12 -07:00
|
|
|
--noNimblePath
|
2023-07-12 18:58:31 -07:00
|
|
|
when withDir(thisDir(), system.fileExists("nimble.paths")):
|
2023-07-12 19:00:12 -07:00
|
|
|
include "nimble.paths"
|
2023-07-12 18:58:31 -07:00
|
|
|
# end Nimble config
|