Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add extra warnings in Oasis?

Tags:

ocaml

oasis

I have this oasis file with several libraries – how can I enable -w .. and -warn-error +a for each of them?


For reference purposes, the given oasis file starts like this:

OASISFormat: 0.4
Name:        re
Version:     1.5.0
Synopsis:    Pure OCaml regular expression library
Authors:     Jerome Vouillon, Thomas Gazagnaire, Anil Madhavapeddy
License:     LGPL-2.0 with OCaml linking exception
Plugins:     META (0.4), DevFiles (0.4)
AlphaFeatures: compiled_setup_ml
BuildTools: ocamlbuild

Library re
  Path:       lib
  InternalModules: Re_cset, Re_automata
  Modules: Re
  Findlibname: re
  BuildDepends: bytes

Library re_emacs
  Path: lib
  XMETADescription: Emacs-compatible regexps
  Modules: Re_emacs
  Findlibname: emacs
  FindlibParent: re
  BuildDepends: re
like image 906
bfops Avatar asked Dec 06 '25 03:12

bfops


1 Answers

At the top level in _oasis, add

AlphaFeatures: ocamlbuild_more_args
XOCamlbuildExtraArgs: "-cflags 'flags'"

-cflags 'flags' will get passed to ocamlbuild, which then passes flags to ocamlc. In this case, the flags are -w +9+27+32 -warn-error +a

like image 90
bfops Avatar answered Dec 09 '25 06:12

bfops



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!