Force compilation with -w @A-4 (all warnings but warning number 4
authorKim Nguyễn <kn@lri.fr>
Tue, 5 Mar 2013 00:34:11 +0000 (01:34 +0100)
committerKim Nguyễn <kn@lri.fr>
Tue, 5 Mar 2013 00:34:11 +0000 (01:34 +0100)
turned into errors. Warning 4 is 'Fragile pattern-matching').

_tags
myocamlbuild.ml

diff --git a/_tags b/_tags
index 571d289..40f25e4 100644 (file)
--- a/_tags
+++ b/_tags
@@ -24,7 +24,7 @@ true:    inline(100), unsafe(true)
 
 <src/auto/*.cmx>:   for-pack(Auto)
 <src/auto>: include
-
 <src>: include
 
-
+#Enable warning for all but generated files:
+not <src/xpath/ulexer.*>: warning(@A-4)
index 41730a6..d198faa 100644 (file)
@@ -28,6 +28,7 @@ let () = dispatch begin
   function
     | Before_rules ->
         set_flags [["ocaml";"compile"]; ["ocaml";"ocamldep"] ] macro_flags;
+        pflag [ "ocaml"; "compile" ] "warning"   (fun s -> (S[ A"-w"; A s]));
         flag [ "ocaml"; "compile"; "debug" ] (S[ A"-g"; A"-ppopt"; A"-DDEBUG"]);
         flag [ "ocaml"; "link"; "debug" ] (A"-g");
         flag [ "ocaml"; "compile"; "profile"] (S[A"-ppopt"; A"-DPROFILE"]);