[cmake-developers] [CMake 0014655]: Setting CMAKE_JAVA_TARGET_OUTPUT_DIR does not set the output for NMake type generator
Matthew Woehlke
matthew.woehlke at kitware.com
Wed Dec 18 16:19:00 EST 2013
On 2013-12-18 15:13, Mantis Bug Tracker wrote:
> Setting CMAKE_JAVA_TARGET_OUTPUT_DIR to the desired output path seems to have no
> affect when using NMake as the generator.
>
> Steps to Reproduce:
> include(UseJava)
>
> set(CMAKE_JAVA_TARGET_OUTPUT_DIR <insert your preferred dir here>)
> add_jar(<add your sources>)
>
> The jar will continue to be placed into the current binary directory.
>
> According to documentation:
>
> "The default OUTPUT_DIR can also be changed by setting the variable
> CMAKE_JAVA_TARGET_OUTPUT_DIR."
>
> Additional Information:
> This appears to be happening because of the use of cmake_parse_arguments in
> UseJava.cmake. _add_jar_OUTPUT_DIR is setup correctly with
> CMAKE_JAVA_TARGET_OUTPUT_DIR until that is called. As there is a work around
> for this (using OUTPUT_DIR in the add_jar command), I logged it as minor.
Does cmake_parse_arguments explicitly clear all variables it is told about?
--
Matthew
More information about the cmake-developers
mailing list