2020-12-26 01:47:55 +01:00
|
|
|
#+TITLE: Common
|
2020-12-27 16:36:25 +01:00
|
|
|
#+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
|
2020-12-26 01:47:55 +01:00
|
|
|
|
|
|
|
|
|
|
|
This directory contains many utility functions used by all the other directories.
|
|
|
|
|
2020-12-27 16:36:25 +01:00
|
|
|
* Dune files :noexport:
|
2020-12-26 01:47:55 +01:00
|
|
|
:PROPERTIES:
|
|
|
|
:dune: lib/dune
|
|
|
|
:dune-test: test/dune
|
|
|
|
:header-args: :noweb yes
|
|
|
|
:END:
|
|
|
|
|
|
|
|
** Headers
|
|
|
|
#+begin_src elisp :tangle (org-entry-get nil "dune" t)
|
|
|
|
(library
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
#+begin_src elisp :tangle (org-entry-get nil "dune-test" t)
|
|
|
|
(library
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
** Library
|
|
|
|
|
|
|
|
*** General information
|
|
|
|
#+begin_src elisp :tangle (org-entry-get nil "dune" t)
|
|
|
|
(name common)
|
|
|
|
(public_name qcaml.common)
|
|
|
|
(synopsis "General utilities used in all QCaml libraries.")
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
#+begin_src elisp :tangle (org-entry-get nil "dune-test" t)
|
|
|
|
(name test_common)
|
|
|
|
(synopsis "Test for common library")
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
*** Dependencies
|
|
|
|
#+begin_src elisp :tangle (org-entry-get nil "dune" t)
|
|
|
|
(libraries
|
|
|
|
str
|
|
|
|
zarith
|
|
|
|
getopt
|
|
|
|
)
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
#+begin_src elisp :tangle (org-entry-get nil "dune-test" t)
|
|
|
|
(libraries
|
|
|
|
alcotest
|
|
|
|
qcaml.common
|
|
|
|
)
|
|
|
|
#+end_src
|
2020-12-27 16:36:25 +01:00
|
|
|
|
2020-12-26 01:47:55 +01:00
|
|
|
*** Extra C files
|
|
|
|
|
2020-12-28 01:08:55 +01:00
|
|
|
The ~util.c~ file contains small C snippets to add missing
|
2020-12-26 01:47:55 +01:00
|
|
|
functionalities to OCaml, such as support for the ~popcnt~ instruction.
|
|
|
|
|
|
|
|
#+begin_src elisp :tangle (org-entry-get nil "dune" t)
|
|
|
|
(c_names
|
2020-12-28 01:08:55 +01:00
|
|
|
util
|
2020-12-26 01:47:55 +01:00
|
|
|
)
|
|
|
|
(c_flags (:standard)
|
|
|
|
-Ofast -march=native -fPIC
|
|
|
|
)
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
** Footers
|
|
|
|
|
|
|
|
#+begin_src elisp :tangle (org-entry-get nil "dune" t)
|
|
|
|
)
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
#+begin_src elisp :tangle (org-entry-get nil "dune-test" t)
|
|
|
|
)
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|