[sledge] Build system support inline tests in all libraries

Reviewed By: mbouaziz

Differential Revision: D12854506

fbshipit-source-id: 34be9ee1f
master
Josh Berdine 6 years ago committed by Facebook Github Bot
parent 10c8b02a8d
commit 11bf7d9a39

@ -28,7 +28,7 @@ let coverage_ppx =
let ppx_flags =
match Jbuild_plugin.V1.context with "dev" -> "--debug" | _ -> ""
let flags deps =
let flags exe_or_lib deps =
Printf.sprintf
{|(flags (%s %s))
(ocamlc_flags (%s))
@ -46,10 +46,12 @@ let flags deps =
ppx_sexp_value
ppx_trace
%s
%s))|}
%s))
%s|}
common_flags
(String.concat " "
(List.map (fun d -> "-open " ^ String.capitalize_ascii d) deps))
ocamlc_flags ocamlopt_flags ppx_flags coverage_ppx
(match exe_or_lib with `lib -> "(inline_tests)" | _ -> "")
let libraries deps = String.concat " " deps

@ -24,4 +24,5 @@ Jbuild_plugin.V1.send
%s
(libraries cmdliner %s))
|}
(flags deps) (libraries deps)
(flags `exe deps)
(libraries deps)

@ -18,4 +18,5 @@ Jbuild_plugin.V1.send
%s
(libraries core_kernel zarith %s))
|}
(flags deps) (libraries deps)
(flags `lib deps)
(libraries deps)

@ -18,4 +18,5 @@ Jbuild_plugin.V1.send
%s
(libraries ctypes ctypes.foreign llvm llvm.irreader llvm.analysis llvm.scalar_opts llvm.target %s))
|}
(flags deps) (libraries deps)
(flags `lib deps)
(libraries deps)

@ -10,12 +10,11 @@ let deps = ["import"; "trace"; "llair_"]
;;
Jbuild_plugin.V1.send
@@ Format.sprintf
{|
@@ Format.sprintf {|
(library
(name symbheap)
%s
(libraries %s)
(inline_tests))
(libraries %s))
|}
(flags deps) (libraries deps)
(flags `lib deps)
(libraries deps)

@ -18,4 +18,5 @@ Jbuild_plugin.V1.send
%s
(libraries %s))
|}
(flags deps) (libraries deps)
(flags `lib deps)
(libraries deps)

Loading…
Cancel
Save