Skip to content

Commit

Permalink
Update to Dune 3.0
Browse files Browse the repository at this point in the history
> Since Dune 2.8, it’s possible to deactivate the systematic
> prepending of flags coming from ocamlc -config to the C compiler
> command line.
> The value true is the default for Dune 3.0.

https://dune.readthedocs.io/en/stable/dune-files.html#use-standard-c-and-cxx-flags
  • Loading branch information
MisterDA authored and rgrinberg committed Oct 15, 2022
1 parent 800885f commit 1c44e95
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 16 deletions.
17 changes: 13 additions & 4 deletions bigstringaf.opam
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,21 @@ bug-reports: "https://github.com/inhabitedtype/bigstringaf/issues"
dev-repo: "git+https://github.com/inhabitedtype/bigstringaf.git"
build: [
["dune" "subst"] {dev}
["dune" "build" "-p" name "-j" jobs]
["dune" "runtest" "-p" name] {with-test}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
depends: [
"dune" {>= "2.6.0"}
"dune-configurator" {>= "2.0.0"}
"dune" {>= "3.0"}
"dune-configurator" {>= "3.0"}
"alcotest" {with-test}
"ocaml" {>= "4.08.0"}
"conf-pkg-config" {build}
Expand Down
4 changes: 2 additions & 2 deletions dune-project
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
(lang dune 2.6)
(lang dune 3.0)
(name bigstringaf)
(formatting disabled)
(formatting (enabled_for dune))
2 changes: 1 addition & 1 deletion lib/config/dune
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
(executable
(name discover)
(libraries dune-configurator))
(libraries dune-configurator))
16 changes: 8 additions & 8 deletions lib/dune
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
(library
(name bigstringaf)
(name bigstringaf)
(public_name bigstringaf)

(foreign_stubs
(language c)
(names bigstringaf_stubs)
(flags (:standard (:include cflags.sexp))))

(js_of_ocaml (javascript_files runtime.js))
)
(names bigstringaf_stubs)
(flags
(:standard
(:include cflags.sexp))))
(js_of_ocaml
(javascript_files runtime.js)))

(rule
(targets cflags.sexp)
(action
(action
(run config/discover.exe)))
2 changes: 1 addition & 1 deletion lib_test/dune
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(test
(name test_bigstringaf)
(libraries alcotest bigstringaf)
(modules test_bigstringaf s))
(modules test_bigstringaf s))

0 comments on commit 1c44e95

Please sign in to comment.