[cmake-developers] Java support

CHEVRIER, Marc marc.chevrier at sap.com
Wed Aug 5 06:24:50 EDT 2015


Hi,

Again, a new version for patch 4. I hope I didn’t miss anything this time. :)
To handle VS generators, I am relying on generator-expressions supported by add_test function.

Marc




On 04/08/15 17:42, "Brad King" <brad.king at kitware.com> wrote:

>On 08/04/2015 04:45 AM, CHEVRIER, Marc wrote:
>> Attached is a new version of patch 4 tested successfully
>> on Linux (SuSE 11.3), Windows (7 64bit) and MacOS (10.10.4)
>
>Thanks.  This still fails for me on Windows with a VS generator
>for two reasons:
>
>1.  The java.library.path setting points at the build directory
>    but not at the per-configuration subdirectory in which VS
>    generators place the .dll file.  I was able to hack around
>    this locally by extending Tests/Java/CMakeLists.txt with:
>
>        set_property(TARGET B PROPERTY RUNTIME_OUTPUT_DIRECTORY_DEBUG .)
>
>    though more work may be needed to work with other configs.
>
>2.  With the above hack it still fails because java produces
>    32-bit binaries but I was using a 64-bit toolchain so the
>    plugin cannot load.
>
>How are we to control the architecture for which java compiles?
>
>Meanwhile I revised the other three commits:
>
> FindJava: Add support for idlj and jarsigner tools
> http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e72806fb
>
> UseJava: Teach add_jar to support file syntax for sources
> http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3d287de4
>
> UseJava: Teach install_jar new DESTINATION and COMPONENT options
> http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cc23f0e9
>
>We need to run the tests each in their own build tree or they
>try to clobber each other during parallel testing.
>
>-Brad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Add-support-for-javah-tool.patch
Type: application/octet-stream
Size: 10056 bytes
Desc: 0004-Add-support-for-javah-tool.patch
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150805/5760677a/attachment.obj>


More information about the cmake-developers mailing list