Define switches in NimScript with a value

Jul 5, 2024

In NimScript you can set flags with a value by doing:

switch("define", "ThreadPoolSize=3")
--define:"ThreadPoolSize=3"

This isn’t really included in the documentation and wasn’t that straightforward to figure out. They just have how to set a flag without a value, like this

# command-line: --opt:size
switch("opt", "size")
# command-line: --define:release or -d:release
switch("define", "release")
# command-line: --forceBuild
switch("forceBuild")

Hope this helps, God bless!


← Back ← Go to all posts