cppo icon indicating copy to clipboard operation
cppo copied to clipboard

Dune: using both cppo and a ppx

Open phstrauss opened this issue 1 year ago • 1 comments

Hello, I'm trying to use both cppo and logs-ppx preprocessing in my dune file, I've read:

https://github.com/ocaml-community/cppo https://dune.readthedocs.io/en/stable/quick-start.html#using-cppo https://github.com/ocaml/dune/issues/171 https://github.com/ocsigen/lwt/issues/411 https://github.com/ocaml/dune/pull/7373

but can't get a solution, could you help me? I'm using latest opam with ocaml 5.0.0. Thanks.

My latest poor attempt is:

(rule ((targets (globals.ml)) (deps (globals.cppo.ml)) (action (run ${bin:cppo} ${<} -o ${@}))))

(rule ((targets (plot2d.ml)) (deps (plot2d.cppo.ml)) (action (run ${bin:cppo} ${<} -o ${@}))))

(executables (names eqfrex) (libraries dspml plwrap lablgtk3 cairo2 plplot plcairo react logs logs.fmt) (preprocess (pps logs-ppx) ) (modes (native exe) (byte exe)) )

Regards.

phstrauss avatar Aug 01 '23 15:08 phstrauss