114.30+68

This commit is contained in:
Jeremie Dimino 2017-02-02 10:31:36 +00:00
parent 1c1a08ec54
commit ae6b09b180
2 changed files with 7 additions and 4 deletions

View File

@ -38,11 +38,12 @@ let header_files ts =
List.fold_left l ~init:acc ~f:(fun acc fn ->
Path.relative dir (fn ^ ".h") :: acc))
let include_paths ts =
List.fold_left ts ~init:Path.Set.empty ~f:(fun acc t ->
Path.Set.add (dir t) acc)
let include_flags ts =
let dirs =
List.fold_left ts ~init:Path.Set.empty ~f:(fun acc t ->
Path.Set.add (dir t) acc)
in
let dirs = include_paths ts in
Arg_spec.S (List.concat_map (Path.Set.elements dirs) ~f:(fun dir ->
[Arg_spec.A "-I"; Path dir]))

View File

@ -14,6 +14,8 @@ module Set : Set.S with type elt := t
val header_files : t list -> Path.t list
val include_paths : t list -> Path.Set.t
val include_flags : t list -> _ Arg_spec.t
val c_include_flags : t list -> _ Arg_spec.t