[CMake] Latest UseJava.cmake
Matthew Woehlke
mw_triad at users.sourceforge.net
Fri Feb 21 16:58:12 EST 2014
On 2014-02-21 13:48, Allen Byrne wrote:
> 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.
Pedantic: if OUTPUT_DIR is given, it should override
CMAKE_JAVA_TARGET_OUTPUT_DIR. I think maybe you didn't mean to suggest
otherwise, but the above can be read that way.
If OUTPUT_DIR is *not* given, CMAKE_JAVA_TARGET_OUTPUT_DIR should be
used. IIUC this is what is not working for you? I wonder if this is an
unexpected behavior in cmake_parse_arguments (setting it to empty if not
specified rather than leaving it along)? I seem to recall there being a
discussion about that semi-recently...
> 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.
As a work-around, you could write a wrapper function, but your
disagreement is reasonable. Patches welcomed.
> 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}
> )
Yes. (IIRC I only left it out because (a) it wasn't present previously,
(b) I didn't need it myself and (c) I am lazy :-).) Again, patches welcomed.
--
Matthew
More information about the CMake
mailing list