Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Caml-list] cmake

0 views
Skip to first unread message

Keyan

unread,
Dec 2, 2009, 5:08:22 AM12/2/09
to Caml...@yquem.inria.fr
hi,

i am currently getting into caml again, and would like to integrate it with my c++ project.

the project i am working on, is completly build with cmake. i tried to search the internet to find ready cmake-scripts or tutorials how to integrate cmake into an exisisting cmake-project, but could not find anything. my question thereore is, how is it done best?

what i want to do is the following:
in addition to the main-project build, i want to build my own code-analysis tools.

make -> build main project + all ocaml-tools
make ocaml-tool-1 -> build only cmake-tool-1
etc.

does anyone have any experience with that?

regards,
keyan
_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Hezekiah M. Carty

unread,
Dec 2, 2009, 11:29:31 AM12/2/09
to Keyan, Caml...@yquem.inria.fr
On Wed, Dec 2, 2009 at 4:08 AM, Keyan <m...@pulsschlag.net> wrote:
> hi,
>
> i am currently getting into caml again, and would like to integrate it with my c++ project.
>
> the project i am working on, is completly build with cmake. i tried to search the internet to find ready cmake-scripts or tutorials how to integrate cmake into an exisisting cmake-project, but could not find anything. my question thereore is, how is it done best?
>
> what i want to do is the following:
> in addition to the main-project build, i want to build my own code-analysis tools.
>
> make -> build main project + all ocaml-tools
> make ocaml-tool-1 -> build only cmake-tool-1
> etc.
>
> does anyone have any experience with that?
>

The PLplot project (http://plplot.sf.net/) uses CMake for its build
system, including bindings for OCaml. The most relevant files for the
OCaml portion are:

http://plplot.svn.sourceforge.net/viewvc/plplot/trunk/cmake/modules/ocaml.cmake?revision=10526&view=markup
http://plplot.svn.sourceforge.net/viewvc/plplot/trunk/bindings/ocaml/CMakeLists.txt?revision=10527&view=markup
http://plplot.svn.sourceforge.net/viewvc/plplot/trunk/bindings/ocaml/plcairo/CMakeLists.txt?revision=10528&view=markup

The first file (ocaml.cmake) performs detects the presence of the
OCaml compiler(s), camlidl and a few libraries. The two
CMakeLists.txt files define the actual compilation steps for two
separate components of the OCaml bindings (camlidl + C + OCaml).

CMake does not have formal OCaml support, so all of the compilation
commands, outputs and dependencies are specified by hand.

Hope this helps.

Hez

--
Hezekiah M. Carty
Graduate Research Assistant
University of Maryland
Department of Atmospheric and Oceanic Science

Keyan

unread,
Dec 2, 2009, 2:15:31 PM12/2/09
to Hezekiah M. Carty, Caml...@yquem.inria.fr
hi,

i just had a look. these files are pretty large. it will take me a while to fully understand them. thanks for the links.

regards,
keyan

0 new messages