MantisBT - CMake
View Issue Details
0003578CMakeCMakepublic2006-08-03 08:232016-06-10 14:30
Richard 
Bill Hoffman 
urgentmajoralways
closedmoved 
 
 
0003578: javac not using full path for -d option
When compiling java files, the javac command is run from the project root directory. This is ok, but the -d option that is passed is not the full path, it is relative to the directory that the java file is in.

Either need fully qualified path in the -d option or need javac command run from each source directory instead of project root directory.



Example to duplicate error
in CMake/Tests/Java
mkdir src
mv A.java ./src/.
mv HelloWorld.java ./src/.
cp CMakeLists.txt ./src/.

edit CMakeLists.txt in /Java as such:

PROJECT(hello Java)
SET(CMAKE_VERBOSE_MAKEFILE 1)

ADD_SUBDIRECTORY(src)

# INCLUDE_DIRECTORIES(${hello_SOURCE_DIR}
# ${hello_BINARY_DIR} )
# ADD_LIBRARY(hello A.java HelloWorld.java)

edit CMakeLists.txt in /Java/src as such:

  INCLUDE_DIRECTORIES(${hello_SOURCE_DIR}
    ${hello_BINARY_DIR} )
  ADD_LIBRARY(hello A.java HelloWorld.java)
No tags attached.
Issue History
2016-06-10 14:27Kitware RobotNote Added: 0041315
2016-06-10 14:27Kitware RobotStatusassigned => resolved
2016-06-10 14:27Kitware RobotResolutionopen => moved
2016-06-10 14:30Kitware RobotStatusresolved => closed

Notes
(0041315)
Kitware Robot   
2016-06-10 14:27   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.