On Wed, Sep 23, 2015 at 09:48:43AM +0200, Anil Madhavapeddy wrote: > On 22 Sep 2015, at 23:12, Magnus Therning wrote: > > > > ~~~ > > + /usr/bin/ocamldep.opt -modules src/main.ml > src/main.ml.depends > > File "src/main.ml", line 12, characters 4-8: > > Error: Syntax error > > Command exited with code 2. > > Compilation unsuccessful after building 1 target (0 cached) in 00:00:00. > > E: Failure("Command ''/usr/bin/ocamlbuild' src/main.byte -tag debug -build-dir /home/magnus/devo/tmp/oasis-camlp4-build/build' terminated with error code 10") > > ~~~ > > > > What am I missing here, how do I get the second example to build? > > The ocamldep invocation here is not passing the -pp parameter to run > the source code through camlp4. I'm not sure how you fix that in > CMake, but add the relevant lines (which should be the same as those > passed to ocamlc/ocamlopt) to ocamldep and it should get further... Ah, OK, I'll have to look into that. I should point out though that I've not started using CMake yet. The examples I showed use just `oasis` (with `ocamlbuild` as its tool). I'm still trying to work out the incantations to use, the integration with CMake comes later :) /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus LeBlanc's law: Later equals never.