[CMake] Adding a new language

Stefan Monnier monnier at iro.umontreal.ca
Fri Nov 11 09:55:12 EST 2011


> According to http://caml.inria.fr/pub/docs/manual-ocaml/manual022.html, it
> does:
> -o exec-file
>     Specify the name of the output file produced by the compiler. The
> default output name is a.out under Unix and camlprog.exe under Windows. If

This manpage describes all kinds of uses and in practice the -o only
applies to the case whre you use ocamlc to link your program (notice how
it says "-o exec file" rather than "-o output-file"), but it seems
ignored when using it to just compile one file.

I guess part of the reason is that in that case there is more than
one output (it generates a .cmo and a .cmi file for each input file), so
it wouldn't be clear what to do with this single "output file name".

> So using
> set (CMAKE_OCaml_COMPILE_OBJECT "<CMAKE_OCaml_COMPILER> -c -o <OBJEJCT>
> <SOURCE>")

> does not work?

Nope,


        Stefan



More information about the CMake mailing list