`--define` with a value can only be used to overwrite constants. You can combine it with another define though:
`nim c -r --define:line=10 --define:useLine foo.nim`
when defined(useLine):
const line {.intdefine.} = 84
echo line
