diff options
Diffstat (limited to 'compiler/options.nim')
-rw-r--r-- | compiler/options.nim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/options.nim b/compiler/options.nim index 88251a42e..26260a770 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -289,7 +289,15 @@ type severity: Severity) {.closure, gcsafe.} cppCustomNamespace*: string +proc setNoteDefaults*(conf: ConfigRef, note: TNoteKind, enabled = true) = + template fun(op) = + conf.notes.op note + conf.mainPackageNotes.op note + conf.foreignPackageNotes.op note + if enabled: fun(incl) else: fun(excl) + proc setNote*(conf: ConfigRef, note: TNoteKind, enabled = true) = + # see also `prepareConfigNotes` which sets notes if note notin conf.cmdlineNotes: if enabled: incl(conf.notes, note) else: excl(conf.notes, note) |