Skip to content

Commit

Permalink
implement the --useVersion emulation feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Araq committed Nov 4, 2019
1 parent b24560a commit 46af816
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compiler/commands.nim
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,10 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
expectArg(conf, switch, arg, pass, info)
case arg
of "1.0":
discard "the default"
defineSymbol(conf.symbols, "NimMajor", "1")
defineSymbol(conf.symbols, "NimMinor", "0")
# always be compatible with 1.0.2 for now:
defineSymbol(conf.symbols, "NimPatch", "2")
else:
localError(conf, info, "unknown Nim version; currently supported values are: {1.0}")
of "benchmarkvm":
Expand Down

0 comments on commit 46af816

Please sign in to comment.