diff options
Diffstat (limited to 'config/config.nims')
-rw-r--r-- | config/config.nims | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/config/config.nims b/config/config.nims new file mode 100644 index 000000000..b8979e8e3 --- /dev/null +++ b/config/config.nims @@ -0,0 +1,23 @@ +# this config.nims also needs to exist to prevent future regressions, see #9990 + +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 |