When using bare ocamlbuild, it is simple-enough - just add -cflags -w <warnings> to the ocamlbuild command line options. But when using Oasis to configure the build - it is less straight forward. Your options are:
- A) use
_tagsfile, which is simple, but incomplete in functionality and documentation - B) use
myocamlbuild.ml, which is not documented at all
I first tried using option (A), but found that it only allows you to add one of the letter options and does not allow disabling individual, numbered, warnings:
Looking at how the above is implemented and a bit more grepping, I found:
val flag : Tags.elt list -> Command.spec -> unitWhich can be used to set arbitrary compiler flags.
This is what I ended-up appending to the end of myocamlbuild.ml, to enable all compiler warnings but 33 (Unused open statement) and 44 (Open statement shadows an already defined identifier):
flag ["ocaml"; "compile"] (S [ A "-w"; A "A-33-44"])