in nim code we can use stuff like:
when (NimMajor, NimMinor, NimPatch) > (0, 18, 0):
import sugar
else:
import future
but how about in nim.cfg ?
eg, /Users/timothee/git_clone/nim/Nim/config/nim.cfg shows:
@if release or quick:
obj_checks:off
@if nimHasNilChecks:
nilchecks:off
@end
@end
@if unix:
..
@end
but how to make following work?
@if NimPatch >= 1
hint[Foo]=on
@end
I'd really love to just be able to use nimscript (nims) instead of nim.cfg, but that runs into: https://github.com/nim-lang/Nim/issues/8235 https://github.com/nim-lang/Nim/pull/8233 (unmerged because PR still needs fixing)
if it's not possible, probably not worth adding support for it in nim.cfg since nims is better suited (pending above issues), however if it is possible, I'd like to know how to