tcompilesetting.nim 541 B

12345678910111213141516171819
  1. discard """
  2. cmd: "nim c --nimcache:build/myNimCache --nimblePath:myNimblePath --gc:arc $file"
  3. joinable: false
  4. """
  5. import std/[strutils,compilesettings]
  6. from std/os import fileExists, `/`
  7. template main =
  8. doAssert querySetting(nimcacheDir) == nimcacheDir.querySetting
  9. doAssert "myNimCache" in nimcacheDir.querySetting
  10. doAssert "myNimblePath" in nimblePaths.querySettingSeq[0]
  11. doAssert querySetting(backend) == "c"
  12. doAssert fileExists(libPath.querySetting / "system.nim")
  13. doAssert querySetting(mm) == "arc"
  14. static: main()
  15. main()