std/compilesettings implementation (#13584)

* Implement compileSetting() and compileSettingSeq()
* Change from magic to vmop
* better design for querySetting

Co-authored-by: genotrance <dev@genotrance.com>
This commit is contained in:
Andreas Rumpf 2020-03-04 13:46:42 +01:00 • committed by GitHub
commit 614fb7567c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 118 additions and 0 deletions

View file

@ -0,0 +1,19 @@
discard """
cmd: "nim c --nimcache:myNimCache --nimblePath:myNimblePath $file"
joinable: false
"""
import strutils
import std / compilesettings
const
nc = querySetting(nimcacheDir)
np = querySettingSeq(nimblePaths)
static:
echo nc
echo np
doAssert "myNimCache" in nc
doAssert "myNimblePath" in np[0]