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 Sat, Sep 19, 2015 at 09:38:58AM +0200, [email protected] wrote:
> -[ Thu, Sep 17, 2015 at 10:09:12AM +0200, Magnus Therning [email protected] [ocaml_beginners] ]----
> > The C/C++ project uses CMake to build and now I'd like to plug my OCaml
> > build into it, but what to use?
> 
> Why not CMake?

- There is no built-in support for building OCaml, it doesn't even come
with any official external module for building OCaml.

- There are several modules available on github, but there doesn't seem
to be any one that's clearly more mature than the others, so I'll have
to spend time picking one. Time that I was hoping to not have to spend
by asking here ;)

- The code I have isn't very complicated, so CMake with a module found
on github will most likely suffice, but I thought it'd be a good idea to
turn to the OCaml community with a question first, since there might be
a tool that is superior to anything out there and that I've missed.

> > I've found at least two OCaml build tools, `omake` and `oasis`
> 
> Have you tried a non ocaml build tools?
> 
> For writing ocaml code do you look for a text editor that's written in
> ocaml? I guess you use a text editor that can write any language. The
> same is true for build tools. CMake, although geared toward C/C++ also
> allows custom rules to be defined.

I'd be happy to try non-OCaml build tools if they are known to
have good support for building OCaml.  Are there any such tools?

As for your comment about text editor.  I've personally found that
language specific build tools generally are better at supporting the
peculiarities of languages than general tools.  CMake is very much
geared toward building C/C++ (and Fortran), but it's not very good at
building Python, or Haskell...  For Python I'd rather use setuptools and
for Haskell I'd use Cabal.  What CMake is fairly good at though is
dealing with "external projects"[1], something that many language
specific build tools don't handle as well.

/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

"Sendmail" and "make" are two well known programs that are pretty widely
regarded as being debugged into existence. That's why their command
languages are so poorly thought out and difficult to learn.  It's not
just you -- everyone finds them troublesome.
     -- Peter van der Linden, Expert C Programming, p. 220


[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.