summary refs log tree commit diff stats
path: root/tools/fakedeps.nim
blob: 6963579dc7138f043438e6b98df1e2ebcd8f89cb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import strutils, os, pegs, strtabs, math, threadpool, times

proc fakeCppDep(x: ptr float) {.importcpp: "fakeCppDep", header: "<vector>".}
proc fakeTimeDep() = echo(times.getDateStr())
proc fakedeps() =
  var x = 0.4
  {.emit: "#if 0\n".}
  fakeCppDep(addr x)
  {.emit: "#endif\n".}

  # this is not true:
  if math.sin(x) > 0.6:
    spawn(fakeTimeDep())

proc main =
  fakedeps()
when isMainModule:
  main()