MantisBT - CMake
View Issue Details
0013110CMakeCMakepublic2012-04-07 13:272016-06-10 14:31
sradomski 
Kitware Robot 
normalfeaturealways
closedmoved 
WindowsWindows7
CMake 2.8.7 
 
0013110: add_jar does not allow wildcards for java files on win32
On unix platforms (MacOSX, Linux), add_jar(TARGET_NAME SRC1 SRC2 .. SRCN) allows for SRC1 to be a wildcard (e.g. ${SOME_PATH}/*.java). While I am not sure that this is supported behaviour, it is *really* useful, when the set of java files is not known at configuration time. In my case, I am using SWIG to generate .java wrapper files from the source tree. On unices I can just have a line:

    ADD_JAR(targetname ${CMAKE_CURRENT_BINARY_DIR}/${UMUNDO_JAVA_DIR}/*.java)

and CMake will do the right thing. On Win32 with Visual Studio 10, this fails with an error MSB6001: "Invalid command line switch for "cmd.exe". Illegal characters in path" and a plethora of warnings in "Microsoft.CppCommon.targets".

Seeing that SWIG is supported in CMake, wildcards with add_jar on the win32 platform would be a really useful feature to complement this.
ADD_JAR(targetname ${PROJECT_SOURCE_DIR}/*.java)
vs.
ADD_JAR(targetname ${PROJECT_SOURCE_DIR}/Test.java)

with a minimal Test.java file in the project's source directory.
No tags attached.
Issue History
2012-04-07 13:27sradomskiNew Issue
2012-08-11 21:35David ColeStatusnew => backlog
2012-08-11 21:35David ColeNote Added: 0030390
2016-06-10 14:28Kitware RobotNote Added: 0042018
2016-06-10 14:28Kitware RobotStatusbacklog => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:28Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0030390)
David Cole   
2012-08-11 21:35   
Sending old, never assigned issues to the backlog.

(The age of the bug, plus the fact that it's never been assigned to anyone means that nobody is actively working on it...)

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer who has the bandwidth to take it on, and ferry a fix through to our 'next' branch for dashboard testing.
(0042018)
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.