From 1546826006ca8debf245f712e398813f12bcd7d6 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Thu, 23 Aug 2018 17:37:23 +0200 Subject: [PATCH] add nimHasWarningX and nimHasHintX defines for feature detection purposes --- compiler/condsyms.nim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compiler/condsyms.nim b/compiler/condsyms.nim index 0cf264ac3f..78645b6fde 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)