Hi all,
Is there a file-scope pragma that I can put at the top of my Nim module, which is equivalent to passing the "--header" option to the compiler?
Perhaps something like the passC pragma, but for the Nim compiler rather than the C compiler?
The compiler complains if I try to use the header pragma in this situation.
(Apologies if I'm missing something obvious. I feel like I've seen the solution to this before, but I can't find any evidence in the documentation.)
Thanks.
OK, thanks @dom96, I'll look into nim.cfg configuration files.
(Another hacky alternative that I considered, was using gorge to run an external nim c --header command at compile-time, but that's obviously a last resort.)
Question: Is there any documentation of the nim.cfg options or format anywhere?
The configuration files documentation section only mentions file-processing priority, nothing about options or format. I've searched around the web for nim.cfg files, but not found much; and what I have found seems rather ad hoc and inconsistent: example 1, example 2, example 3
Thanks for any further insight anyone can offer...
The dot-qualified variables like arm.linux.gcc.exe are interesting, as are the conditionals like @if windows.
Is there a nim.cfg format specification to be found anywhere?