summary refs log tree commit diff stats
path: root/compiler/commands.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-11-04 21:58:26 +0100
committerAndreas Rumpf <rumpf_a@web.de>2019-11-04 21:58:26 +0100
commit46af8164c0a71fc154afa2bd528d7a1f9d1cd6eb (patch)
treeae9ff34e208d3679af087f066f5950eadc801b0f /compiler/commands.nim
parentb24560a140f32c6289786a213250a82df2979aa4 (diff)
downloadNim-46af8164c0a71fc154afa2bd528d7a1f9d1cd6eb.tar.gz
implement the --useVersion emulation feature
Diffstat (limited to 'compiler/commands.nim')
-rw-r--r--compiler/commands.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim
index 068fcbc92..c69dd3226 100644
--- a/compiler/commands.nim
+++ b/compiler/commands.nim
@@ -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":