Merge branch 'master' into stable

This commit is contained in:
Simon Cruanes 2018-01-14 20:49:15 -06:00
commit 2351b18464
8 changed files with 31 additions and 13 deletions

View file

@ -26,10 +26,8 @@ before_install:
install: install:
# Install dependencies # Install dependencies
- opam pin add --no-action sequence . - opam pin add --no-action sequence .
- opam install oasis - opam install jbuilder base-bytes result
- opam install --deps-only sequence
script: script:
- make build - make build
- opam install qcheck qtest - opam install qcheck qtest
- ./configure --enable-tests
- make test - make test

View file

@ -5,7 +5,7 @@ build:
jbuilder build @install jbuilder build @install
test: test:
jbuilder runtest jbuilder runtest --no-buffer
clean: clean:
jbuilder clean jbuilder clean

View file

@ -1,6 +1,6 @@
QTEST_PREAMBLE='' QTEST_PREAMBLE=''
DONTTEST=../src/sequenceLabels.ml DONTTEST=../src/sequenceLabels.ml ../src/mkflags.ml
QTESTABLE=$(filter-out $(DONTTEST), \ QTESTABLE=$(filter-out $(DONTTEST), \
$(wildcard ../src/*.ml) \ $(wildcard ../src/*.ml) \
$(wildcard ../src/*.mli) \ $(wildcard ../src/*.mli) \

View file

@ -1,7 +1,7 @@
(rule (rule
((targets (run_qtest.ml)) ((targets (run_qtest.ml))
(deps ((file Makefile))) (deps ((file Makefile) )) ; (glob_files ../src/**/*.ml{,i})))
(fallback) (fallback)
;(libraries (qtest qcheck)) ;(libraries (qtest qcheck))
(action (action

View file

@ -31,6 +31,6 @@ homepage: "https://github.com/c-cube/sequence/"
depopts: [ depopts: [
"base-bigarray" "base-bigarray"
] ]
doc: "http://cedeela.fr/~simon/software/sequence/Sequence.html" doc: "https://c-cube.github.io/sequence/"
bug-reports: "https://github.com/c-cube/sequence/issues" bug-reports: "https://github.com/c-cube/sequence/issues"
dev-repo: "https://github.com/c-cube/sequence.git" dev-repo: "https://github.com/c-cube/sequence.git"

View file

@ -5,7 +5,6 @@
(libraries (sequence bigarray)) (libraries (sequence bigarray))
(wrapped false) (wrapped false)
(optional) (optional)
(flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -w -33 -safe-string -color always)) (flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string))
(ocamlopt_flags (:standard -O3 -color always (ocamlopt_flags (:standard (:include ../flambda.flags)))
-unbox-closures -unbox-closures-factor 20))
)) ))

View file

@ -1,11 +1,18 @@
(rule
((targets (flambda.flags))
(deps ((file mkflags.ml)))
(fallback)
(action
(run ocaml ./mkflags.ml))
))
(library (library
((name sequence) ((name sequence)
(public_name sequence) (public_name sequence)
(wrapped false) (wrapped false)
(flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string -color always -nolabels)) (modules (Sequence SequenceLabels))
(ocamlopt_flags (:standard -O3 -color always (flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string -nolabels))
-unbox-closures -unbox-closures-factor 20)) (ocamlopt_flags (:standard (:include flambda.flags)))
(libraries (bytes result)) (libraries (bytes result))
)) ))

14
src/mkflags.ml Normal file
View file

@ -0,0 +1,14 @@
let () =
let major, minor =
Scanf.sscanf Sys.ocaml_version "%u.%u"
(fun major minor -> major, minor)
in
let after_4_3 = (major, minor) >= (4, 3) in
let flags_file = open_out "flambda.flags" in
if after_4_3 then (
output_string flags_file "(-O3 -unbox-closures -unbox-closures-factor 20 -color always)\n";
) else (
output_string flags_file "()\n";
);
close_out flags_file