Hi there!
Currently I compile my program with
nim c -d:ssl --threads:on app.nim
I also have an {.experimental.} pragma inside app.nim which I assume could be replaced with another flag to the compiler.
Right now I'm a bit confused about these flags and parameters.
Thanks
For first question: For single letter options one dash is used, for multiple letter options (long option name) two dashes. That is what Unix does, I think Nim compiler uses same behaviour.
No idea for question 2.
For last question: Compiler options in local nim.cfg file can be used like this example, there may be many more variants:
$ cat ~/nim-chess4/nim.cfg
path:"$projectdir"
nimcache:"/tmp/$projectdir"
gcc.options.speed = "-march=native -O3 -flto -fstrict-aliasing"
The usage of the Nim compiler is described in this document: https://nim-lang.github.io/Nim/nimc.html
Switches without dash is a command. They specify what Nim compiler do. Switches with one dash or two dashes are options. One dash options are short version of two dashes options. They are used by people who don't want to type long option name.
Commands are like name of procedure and options are like parameters of procedure in Nim langauege. This pattern (progname command [options] argments ...)is often used by other command line tool like git, systemctl, ip.
About 2nd question, I think you should specify parameters using pragma in the code only when your code depends these parameters. Changing command line switch on command line or on nim.cfg is easier than changin them on the code.
3rd question How Configuration files are processed is described here: https://nim-lang.github.io/Nim/nimc.html#compiler-usage-configuration-files For example, you can set nimcache option on nim.cfg file like:
nimcache = "/tmp/nimcache/$projectName/release"
If you want to see more example of nim.cfg file, google "nim.cfg" or check https://github.com/nim-lang/Nim/blob/devel/config/nim.cfg