Skip to content

Commit

Permalink
Merge pull request #128 from mirage/benchmark
Browse files Browse the repository at this point in the history
Enable compilation of benchmark only when the profile is benchmark
  • Loading branch information
dinosaure authored May 10, 2021
2 parents a9de9a5 + 974c066 commit a436a13
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions bench/dune
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
(foreign_stubs
(language c)
(names mclock bs))
(enabled_if
(= %{profile} benchmark))
(preprocess
(pps ppx_deriving_yojson))
(libraries
Expand All @@ -19,6 +21,8 @@
(executable
(name run)
(modules run)
(enabled_if
(= %{profile} benchmark))
(libraries cmdliner fpath rresult bos))

(rule
Expand All @@ -30,6 +34,8 @@

(rule
(targets output.csv)
(enabled_if
(= %{profile} benchmark))
(deps
(:run run.exe)
(:zpipe zpipe)
Expand All @@ -43,6 +49,8 @@
(name lz_landmarks)
(optional)
(modules lz_landmarks)
(enabled_if
(= %{profile} benchmark))
(libraries bigarray-compat checkseum optint landmarks de)
(preprocess
(pps landmarks.ppx --auto)))
Expand All @@ -56,12 +64,16 @@
(executable
(name lzld)
(modules lzld)
(enabled_if
(= %{profile} benchmark))
(libraries decompress.de lz_landmarks))

(library
(name de_landmarks)
(optional)
(modules de_landmarks)
(enabled_if
(= %{profile} benchmark))
(libraries bigarray-compat checkseum optint landmarks de)
(flags
(:standard -w -55))
Expand All @@ -77,4 +89,6 @@
(executable
(name densld)
(modules densld)
(enabled_if
(= %{profile} benchmark))
(libraries cmdliner de_landmarks bigstringaf))
2 changes: 2 additions & 0 deletions decompress.opam
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ depends: [
"fmt" {with-test}
"camlzip" {>= "1.10" & with-test}
"base64" {>= "3.0.0" & with-test}
"crowbar" {with-test & >= "0.2"}
"rresult" {with-test}
]

0 comments on commit a436a13

Please sign in to comment.