Re: Which build tool to use?

"Magnus Therning [email protected] [ocaml_beginners]" <[email protected]>
Newsgroups gmane.comp.lang.ocaml.beginners
Message-ID <[email protected]>
On Thu, Sep 17, 2015 at 11:59:25PM +0200, Gabriel Scherer [email protected] [ocaml_beginners] wrote:
> >
> > So far I've simply run `corebuild` (a simple wrapper around
> > `ocamlbuild`), but that leaves some build stuff in the source folder
> > (that sort of breaks with CMake's tradition of building
> > out-of-source).
> 
> 
> I'm fairly surprised by this, as ocamlbuild takes care to produce all
> target outputs in a separate folder (the _build subdirectory). Could
> you say more about what you are doing, what happens and what you
> expect?

Don't be surprised, I'm being unclear!

This is what I mean:  it won't let me decide where to build.

I have a large-ish C/C++ project that uses CMake to build.  In a
sub-subfolder I have put the OCaml source for a test utility
(`src/utils/tool/`).  Following CMake best practices I create a build
folder at the top of the project and run `cmake ..` in it to generate
make files.  This is what I need to hook into.  CMake has support for
what they call external projects[1], which is how I hook in the OCaml
building.  However, I haven't found any way of controlling where the
build artefacts end up, `corebuild` puts all stuff in
`src/utils/tool/_build/` whereas I want it somewhere under `_build` (to
follow the CMake example I want it in `_build/src/utils/tool`).

In short:

1. I run builds in `_build`
2. I want all built artefacts to end up under `_build`
3. I haven't found a way to make `ocamlbuild` build in that way

/M

[1]: http://www.cmake.org/cmake/help/v3.3/module/ExternalProject.html

-- 
Magnus Therning                      OpenPGP: 0xAB4DFBA4 
email: [email protected]   jabber: [email protected]
twitter: magthe               http://therning.org/magnus

Time is a great teacher, but unfortunately it kills all its pupils.
     -- Hector Louis Berlioz


[Non-text portions of this message have been removed]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.