[CMake] Support for building of OCaml software?

Judicaël Bedouet j.bedouet at infonie.fr
Sat Apr 19 07:45:13 EDT 2014


I'm sorry. I completely forgot your email. Below are my answer to your last
questions.

Please, have a look to the examples. Some of the answers are in this
CMakeLists:
https://github.com/ocaml-cmake/ocaml-cmake/blob/master/examples/code-analysis/CMakeLists.txt

Regards,

J. Bedouet

> bytecode
> How do you think about to extend configuration checks for the OCaml
compiler which generates native code?
By default, I generate bytecode executables. If you want native
executables, you can specify it in the CMakeLists for each target or set
the option CMAKE_OCaml_NATIVE to TRUE.

> Will any implementation for native code generation apply also aggressive
software optimisations?
As I said, the only implementation that I know is this one:
http://caml.inria.fr/. Let me know if you know another one.
If you want more "aggressive" optimizations, you can change the variable
CMAKE_OCaml_FLAGS_RELEASE through the CMake GUI.

> interfaces
If you mean .mli files, hopefully they are managed.

> librarian (linker?)
You can use the CMake GUI to change the variables CMAKE_OCaml_LINKER_FLAGS*.

> OPAM, GODI. Is there a need to make package generation easier?
This is not the purpose of CMake. You can use install and CPack to generate
generic packages (.tar.gz, .zip, .rpm, .deb...).

> I guess that also some further considerations would help around the
command "install", wouldn't it?
I wrapped the install commands to have something more convenient (have a
look to the examples and the module documentation) but you can decide to
use the native install commands...

> Would further checks be useful for tools like "as" (GNU assembler), "ar"
and "ranlib" from the software package "binutils"?
I don't understand the reason of this question. It seems to me that this is
a more general question to CMake than specific to OCaml. Do you have an
example where it is necessary ?



On Fri, Apr 18, 2014 at 8:45 PM, SF Markus Elfring <
elfring at users.sourceforge.net> wrote:

> > https://github.com/ocaml-cmake/ocaml-cmake
>
> How do you think about to extend configuration checks for the OCaml
> compiler
> which generates native code?
>
> Would further checks be useful for tools like "as" (GNU assembler), "ar"
> and
> "ranlib" from the software package "binutils"?
>
> Regards,
> Markus
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140419/8c7473be/attachment.html>


More information about the CMake mailing list