basicopt.txt 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. nim command [options] [projectfile] [arguments]
  2. Command:
  3. //compile, c compile project with default code generator (C)
  4. //r compile to $nimcache/projname, run with `arguments`
  5. using backend specified by `--backend` (default: c)
  6. //doc generate the documentation for inputfile for
  7. backend specified by `--backend` (default: c)
  8. Arguments:
  9. arguments are passed to the program being run (if --run option is selected)
  10. Options:
  11. -p, --path:PATH add path to search paths
  12. -d, --define:SYMBOL(:VAL)
  13. define a conditional symbol
  14. (Optionally: Define the value for that symbol,
  15. see: "compile time define pragmas")
  16. -u, --undef:SYMBOL undefine a conditional symbol
  17. -f, --forceBuild:on|off force rebuilding of all modules
  18. --stackTrace:on|off turn stack tracing on|off
  19. --lineTrace:on|off turn line tracing on|off
  20. --threads:on|off turn support for multi-threading on|off
  21. -x, --checks:on|off turn all runtime checks on|off
  22. -a, --assertions:on|off turn assertions on|off
  23. --opt:none|speed|size optimize not at all or for speed|size
  24. Note: use -d:release for a release build!
  25. --debugger:native use native debugger (gdb)
  26. --app:console|gui|lib|staticlib
  27. generate a console app|GUI app|DLL|static library
  28. -r, --run run the compiled program with given arguments
  29. --eval:cmd evaluate nim code directly; e.g.: `nim --eval:"echo 1"`
  30. defaults to `e` (nimscript) but customizable:
  31. `nim r --eval:'for a in stdin.lines: echo a'`
  32. --fullhelp show all command line switches
  33. -h, --help show this help
  34. -v, --version show detailed version information
  35. Note, single letter options that take an argument require a colon. E.g. -p:PATH.