I'm trying to use cmake for a project using OCaml, so I'm trying to add
support for a new language.
Among the many problems I encounter, the most pressing is the
following: the rule to build object files (CMAKE_OCaml_COMPILE_OBJECT)
seems to want a command that takes <SOURCE> and generates <OBJECT>, both
of which absolute file names.
Problems is, `ocamlc' seems to insist on sending the result to a file
name of its own choosing (basically <SOURCE> with the extension
modified). Worse yet: it generates 2 files (a .cmo object file and
a .cmi that is similar to a header file).
The rule below "works":
set (CMAKE_OCaml_COMPILE_OBJECT
"<CMAKE_OCaml_COMPILER> -c <SOURCE> \; mv \"$$(dirname <SOURCE>)/$$(basename
<OBJECT>)\" <OBJECT>")
but it's clearly not what we want.
- How do I tell Cmake that `ocamlc' generates 2 files?
- How do I tell Cmake that `ocamlc' does not let us choose where to put
the result?
Stefan
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake