[CMake] Supporting languages where compilation of one file produces multiple files

Brandon Van Every bvanevery at gmail.com
Sun Aug 19 02:20:15 EDT 2007


On 8/18/07, Jack Kelly <endgame.dos at gmail.com> wrote:
>
> I'm specifically thinking about OCaml here, but the problem generalises
> to other languages where the compiler doesn't output exactly one file.
>
> I guess the rule for CMAKE_OCaml_COMPILE_OBJECT would be
> "<CMAKE_OCaml_COMPILER> <FLAGS> -c -o <OBJECT> <SOURCE>"
> but there doesn't seem to be any way to store that these extra files
> have been generated.

When building Chicken Scheme, I didn't bother trying to create
official language support.  Chicken emits both a .c file and an
.exports file.  I just used ADD_CUSTOM_COMMAND with multiple OUTPUT.
Now of course, building Chicken is not the same as using Chicken.


Cheers,
Brandon Van Every


More information about the CMake mailing list