[cmake-developers] [CMake 0014655]: Setting CMAKE_JAVA_TARGET_OUTPUT_DIR does not set the output for NMake type generator

Mantis Bug Tracker mantis at public.kitware.com
Wed Dec 18 15:13:47 EST 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=14655 
====================================================================== 
Reported By:                Steve Wolak
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14655
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-12-18 15:13 EST
Last Modified:              2013-12-18 15:13 EST
====================================================================== 
Summary:                    Setting CMAKE_JAVA_TARGET_OUTPUT_DIR does not set
the output for NMake type generator
Description: 
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.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-12-18 15:13 Steve Wolak    New Issue                                    
======================================================================




More information about the cmake-developers mailing list