summary refs log tree commit diff stats
path: root/config/config.nims
diff options
context:
space:
mode:
Diffstat (limited to 'config/config.nims')
-rw-r--r--config/config.nims24
1 files changed, 21 insertions, 3 deletions
diff --git a/config/config.nims b/config/config.nims
index 24c790168..b8979e8e3 100644
--- a/config/config.nims
+++ b/config/config.nims
@@ -1,5 +1,23 @@
 # this config.nims also needs to exist to prevent future regressions, see #9990
 
-when defined(nimHasCppDefine):
-  cppDefine "errno"
-  cppDefine "unix"
+cppDefine "errno"
+cppDefine "unix"
+
+# mangle the macro names in nimbase.h
+cppDefine "NAN_INFINITY"
+cppDefine "INF"
+cppDefine "NAN"
+
+when defined(nimStrictMode):
+  # xxx add more flags here, and use `-d:nimStrictMode` in more contexts in CI.
+
+  # enable this:
+  # when defined(nimHasWarningAsError):
+  #   switch("warningAsError", "UnusedImport")
+
+  when defined(nimHasHintAsError):
+    # switch("hint", "ConvFromXtoItselfNotNeeded")
+    switch("hintAsError", "ConvFromXtoItselfNotNeeded")
+    # future work: XDeclaredButNotUsed
+
+switch("define", "nimVersion:" & NimVersion) # deadcode