diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-08-23 17:37:23 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-08-23 17:37:23 +0200 |
commit | 1546826006ca8debf245f712e398813f12bcd7d6 (patch) | |
tree | b82aa8511dd3c429f8557a33edb47ddcc4a2ce34 /compiler | |
parent | ae0255ea6723c1b271d5064ea4e69fb994520102 (diff) | |
download | Nim-1546826006ca8debf245f712e398813f12bcd7d6.tar.gz |
add nimHasWarningX and nimHasHintX defines for feature detection purposes
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/condsyms.nim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/condsyms.nim b/compiler/condsyms.nim index 0cf264ac3..78645b6fd 100644 --- a/compiler/condsyms.nim +++ b/compiler/condsyms.nim @@ -13,6 +13,7 @@ import strtabs, platform, strutils, idents from options import Feature +from lineinfos import HintsToStr, WarningsToStr const catNone = "false" @@ -83,3 +84,8 @@ proc initDefines*(symbols: StringTableRef) = defineSymbol("nimHasNilSeqs") for f in low(Feature)..high(Feature): defineSymbol("nimHas" & $f) + + for s in WarningsToStr: + defineSymbol("nimHasWarning" & s) + for s in HintsToStr: + defineSymbol("nimHasHint" & s) |