Nim
Nim copied to clipboard
add `srcDir` variable to nim.cfg
There might be a way to do this but I couldn't find anything about it. This is a very simple thing that goes a long way in certain situations. Trying to avoid needing to switch to nimscript just to get:
# config.nims
import os
let srcDir = currentSourcePath.parentDir()
switch("define", &"ProjPath:\"{srcDir}\"")
with this change just needs:
# nim.cfg
d %= "ProjPath=$srcDir"