[CMake] Latest UseJava.cmake

Allen Byrne byrn at hdfgroup.org
Fri Feb 21 13:48:14 EST 2014


Great work folks improving the Java support. I still have a couple of issues 
if anyone can help.

One is the issue with, http://public.kitware.com/Bug/view.php?id=14655, the 
CMAKE_JAVA_TARGET_OUTPUT_DIR doesn't override OUTPUT_DIR. I disagree with the 
issue being minor, because if you have a lot of JARs, it can be really 
annoying and error prone to set that everywhere. We just set the 
CMAKE_JAVA_TARGET_OUTPUT_DIR at the top of our root CMakeLists.cmake file.

Could MANIFEST be added to the options in:

    cmake_parse_arguments(_add_jar
      ""
      "VERSION;OUTPUT_DIR;OUTPUT_NAME;ENTRY_POINT;MANIFEST"
      "SOURCES;INCLUDE_JARS"
      ${ARGN}
    )
Of course the COMMAND;
            COMMAND ${Java_JAR_EXECUTABLE}
                -ufm ${_JAVA_JAR_OUTPUT_PATH}
                ${_add_jar_MANIFEST}
 for this would need to be added to the
    # create the jar file
section properly.

The only other issue is adding optional support for COMPONENT to the INSTALL 
functions.

Otherwise, everything has been rock solid for us.

Allen Byrne
The HDF Group



More information about the CMake mailing list