diff --git a/lib/compilation.nim b/lib/compilation.nim new file mode 100644 index 0000000000..cdf5b6cbbf --- /dev/null +++ b/lib/compilation.nim @@ -0,0 +1,15 @@ +const + NimMajor* {.intdefine.}: int = 1 + ## is the major number of Nim's version. Example: + ## + ## .. code-block:: Nim + ## when (NimMajor, NimMinor, NimPatch) >= (1, 3, 1): discard + # see also std/private/since + + NimMinor* {.intdefine.}: int = 6 + ## is the minor number of Nim's version. + ## Odd for devel, even for releases. + + NimPatch* {.intdefine.}: int = 11 + ## is the patch number of Nim's version. + ## Odd for devel, even for releases. diff --git a/lib/system.nim b/lib/system.nim index 0d70ff5cc7..c8dcdbf133 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -2116,21 +2116,7 @@ template unlikely*(val: bool): bool = else: unlikelyProc(val) -const - NimMajor* {.intdefine.}: int = 1 - ## is the major number of Nim's version. Example: - ## - ## .. code-block:: Nim - ## when (NimMajor, NimMinor, NimPatch) >= (1, 3, 1): discard - # see also std/private/since - - NimMinor* {.intdefine.}: int = 6 - ## is the minor number of Nim's version. - ## Odd for devel, even for releases. - - NimPatch* {.intdefine.}: int = 11 - ## is the patch number of Nim's version. - ## Odd for devel, even for releases. +include compilation import system/dollars export dollars diff --git a/nim.nimble b/nim.nimble index f6df78e843..4ac56ac9c5 100644 --- a/nim.nimble +++ b/nim.nimble @@ -1,4 +1,4 @@ -include "lib/system/compilation.nim" +include "lib/compilation.nim" version = $NimMajor & "." & $NimMinor & "." & $NimPatch author = "Andreas Rumpf" description = "Compiler package providing the compiler sources as a library."