Disable warning 50 for configurator on 4.02.3
This commit is contained in:
parent
126c91fcd5
commit
9f9a770b13
|
@ -0,0 +1,6 @@
|
||||||
|
(jbuild_version 1)
|
||||||
|
|
||||||
|
(executable
|
||||||
|
((name mk)))
|
||||||
|
|
||||||
|
(rule (with-stdout-to flags.sexp (run ./mk.exe -ocamlv ${ocaml_version})))
|
|
@ -0,0 +1,25 @@
|
||||||
|
open Printf
|
||||||
|
|
||||||
|
let parse_version s =
|
||||||
|
Scanf.sscanf s "%d.%d.%d" (fun a b c -> a, b, c)
|
||||||
|
|
||||||
|
let () =
|
||||||
|
let usage =
|
||||||
|
sprintf "%s -ocamlv version" (Filename.basename Sys.executable_name) in
|
||||||
|
let ocaml_version = ref "" in
|
||||||
|
let anon _ =
|
||||||
|
raise (Arg.Bad "anonymous arguments aren't accepted") in
|
||||||
|
Arg.parse
|
||||||
|
[ "-ocamlv"
|
||||||
|
, Arg.String (fun s -> ocaml_version := s)
|
||||||
|
, "Version of ocaml being used"
|
||||||
|
] anon usage;
|
||||||
|
if !ocaml_version = "" then
|
||||||
|
raise (Arg.Bad "Provide version with -ocamlv")
|
||||||
|
else
|
||||||
|
let (x, y, _) = parse_version !ocaml_version in
|
||||||
|
if x >= 4 && y > 2 then (
|
||||||
|
printf "()\n"
|
||||||
|
) else (
|
||||||
|
printf "(-w -50)\n"
|
||||||
|
)
|
|
@ -1,7 +1,7 @@
|
||||||
(library
|
(library
|
||||||
((name configurator)
|
((name configurator)
|
||||||
(flags (:standard -safe-string))
|
|
||||||
(libraries (stdune ocaml_config))
|
(libraries (stdune ocaml_config))
|
||||||
|
(flags (:standard -safe-string (:include flags/flags.sexp)))
|
||||||
(preprocess no_preprocessing)))
|
(preprocess no_preprocessing)))
|
||||||
|
|
||||||
(jbuild_version 1)
|
(jbuild_version 1)
|
||||||
|
|
Loading…
Reference in New Issue