Hello everyone,
Is there a way to add custom compiler flags (e.g. -d:danger) to the nimble install task? I know that I can use the --passNim flag on the nimble call, but I was wondering if this could be directly abstracted from the user in the nimble file of my package. I tried creating my own task with a different name than install, and it works, but the only caveat is that the user can't just run nimble install /url/to/git and have the nimble package installed with my flags, as the install task has its own. I have also tried to add the additional flags to the before install:, without success. Alternatively, is there a way to overwrite the install task completely?
$ cat hi.nim
echo 42
$ cat hi.nims
--define:danger
$ nim c hi.nim
Hint: used config file '/home/juan/.choosenim/toolchains/nim-1.0.2/config/nim.cfg' [Conf]
Hint: used config file '/home/juan/code/temp/hi.nims' [Conf]
Hint: [Link]
Hint: operation successful (2180 lines compiled; 0.6 sec total; 19.9MiB peakmem; Dangerous Release Build)
🙂