[CMake] Is there a tool pretty much like cmake for Java?

Michał Czuczman biurku at gmail.com
Fri Oct 15 17:13:41 EDT 2010


 W dniu 15.10.2010 08:40, Jesper Eskilson pisze:
> On 10/14/2010 10:22 PM, Michał Czuczman wrote:
>
>> I would be interested in improving Java support in CMake.  A source code
>> parser which finds out names of generated output object files, as in the
>> SCons Java support, is a must.  That's what the current Java support in
>> CMake lacks the most.  I've searched through CMake source code and it
>> looks like the object file name is always obtained just from the source
>> file name.  Unfortunately this doesn't work for Java.  Would you please
>> give me some more details on how do you see the module implemented?  Or
>> some hints from where to start?  The most tricky part is how to handle
>> changing dependencies.  Should the classes and jar be separate targets,
>> as it is in SCons?
>
> I like CMake a lot, but when it comes to Java, I just don't see the
> benefits. For me, the strength of CMake is the ability to build C/C++
> on multiple platforms from a single specification. There is a plethora
> of different build systems which are tailored to work well with Java.
> In that world, I don't see what value CMake has.
>
> I'm not going to argue against improving CMake support in Java, I'm
> just curious.

I use CMake for building a multi-platform multi-language project where
for most parts it fits very well.  However, one part of the project is
written in Java, with some native implementations.  So it would be great
to have a nice Java support in CMake.  Using another build system just
for that part adds one to many build-time dependency.

The pitfalls I've encountered in CMake Java support were:

    * All objects are always rebuilt.
    * The generated JAR file is polluted with build system CMake files.

This is why I would like to contribute to the great CMake project and
have a nice simple Java support.

--
Best regards,
Michał Czuczman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101015/7287aefa/attachment-0002.htm>


More information about the CMake mailing list