Re: Defining variable in nim.cfg

2018-03-13 Thread mashingan
.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".

Re: Defining variable in nim.cfg

2018-03-13 Thread c0ntribut0r
@Ar thx, super handy! Can't understand why .cfg configs aren't deprecated though

Re: Defining variable in nim.cfg

2018-03-13 Thread Arrrrrrrrr
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)

Re: Defining variable in nim.cfg

2018-03-12 Thread c0ntribut0r
@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

Re: Defining variable in nim.cfg

2018-03-12 Thread mratsim
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.

Re: Defining variable in nim.cfg

2018-03-12 Thread Libman
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...

Defining variable in nim.cfg

2018-03-11 Thread c0ntribut0r
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?