3

我有这个-w ..包含多个库的oasis 文件——我该如何启用-warn-error +a它们?


出于参考目的,给定的 oasis 文件如下所示:

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
4

1 回答 1

5

在 中的顶层_oasis,添加

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

-cflags 'flags'将传递给ocamlbuild,然后传递flagsocamlc. 在这种情况下,标志是-w +9+27+32 -warn-error +a

于 2016-01-06T21:56:19.733 回答