MantisBT - CMake
View Issue Details
0012055CMakeCMakepublic2011-04-07 12:022016-06-10 14:31
Oliver Buchtala 
Andreas Schneider. 
normalfeatureN/A
closedmoved 
 
 
0012055: Java: support source file lists for java compilation
Javac allows to specify source files by using a list file containing paths to multiple java source files.
E.g. javac @my_list_file.txt

This way, one could deal with dynamically generated source files which are not known at configure time (swig output in my case).

Find an attached patch as an initial suggestion and basis for discussion.

In the suggested solution one can add a '@<path-to-file>' to the _JAVA_SOURCE_FILES argument handed to the add_jar function. Source files with leading '@' are detected and treated adequately.
Attached a git unified-diff created on 'Modules/UseJava.cmake' in 1df325da44520a4db2ddc6d2586b83d33d7ec807 of git://cmake.org/stage/cmake.git [^]

No tags attached.
patch UseJava_support_source_file_lists.patch (2,571) 2011-04-07 12:02
https://public.kitware.com/Bug/file/3803/UseJava_support_source_file_lists.patch
Issue History
2011-04-07 12:02Oliver BuchtalaNew Issue
2011-04-07 12:02Oliver BuchtalaFile Added: UseJava_support_source_file_lists.patch
2011-04-07 13:22Brad KingAssigned To => Andreas Schneider.
2011-04-07 13:22Brad KingStatusnew => assigned
2011-08-20 06:28Andreas Schneider.Note Added: 0027252
2016-06-10 14:28Kitware RobotNote Added: 0041829
2016-06-10 14:28Kitware RobotStatusassigned => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0027252)
Andreas Schneider.   
2011-08-20 06:28   
Hi,

thanks for your patch. The first check should be:

if (_JAVA_SOURCE_FILE MATCHES "^@")
    string(REGEX REPLACE "^@" "" _JAVA_SOURCE_FILE "${_JAVA_SOURCE_FILE}")
    set(_JAVA_IS_SOURCE_LIST_FILE TRUE)
else()
    set(_JAVA_IS_SOURCE_LIST_FILE FALSE)
endif()

Please test the TODO. Or write a test for it. We need to make sure this works.
(0041829)
Kitware Robot   
2016-06-10 14:28   
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.