Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dune: using both cppo and a ppx #86

Open
phstrauss opened this issue Aug 1, 2023 · 1 comment
Open

Dune: using both cppo and a ppx #86

phstrauss opened this issue Aug 1, 2023 · 1 comment

Comments

@phstrauss
Copy link

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
ocaml/dune#171
ocsigen/lwt#411
ocaml/dune#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.

@pmetzger
Copy link
Member

This would seem to be a dune question, not a cppo question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants