.cfg config helpful when all you need just simply additional options.
Just name the cfg like "yourmodule.nim.cfg" and Nim compiler will only use that
option when you try to compile "yourmodule.nim", it won't be used when you
compile "anothermodule.nim".
@Ar thx, super handy! Can't understand why .cfg configs aren't
deprecated though
It is worth to check out nimscript too:
[https://nim-lang.org/docs/nims.html](https://nim-lang.org/docs/nims.html)
[https://nim-lang.org/docs/nimscript.html](https://nim-lang.org/docs/nimscript.html)
@mratsim Cool, thank you very much! Definitely saw that file earlier but VS
Code underlines some lines in red so I thought something was wrong... But it
works!
# nim.cfg
define:"var=value"
@Libman Sure, but I didn't want to touch shell scripts at all. Not only cause
they
Yes you can, feel free to check Arraymancer `nim.cfg`:
[https://github.com/mratsim/Arraymancer/blob/master/nim.cfg](https://github.com/mratsim/Arraymancer/blob/master/nim.cfg)
@libman: Unfortunately shell scripts would not work on all Windows for example.
A long long time ago we had this crazy thing called shell scripts. We used them
to set environmental variables, build complicated command lines, etc...
Hello, I have a long compilation command like this:
nim c -r -o=../build -d:myUglyVariable:"myUglyValue" main.nim
--loglevel=DEBUG
I'd like to move all that in nim.cfg, or at least that ugly variable, so that I
type just
nim c -r main.nim
Is that possible?