summaryrefslogtreecommitdiffstats
path: root/Modules/UseJava.cmake
Commit message (Collapse)AuthorAgeFilesLines
* UseJava: Fix classpath separator on WIN32 cross compilation (#15206)Lorenz Witte2014-10-141-1/+1
| | | | | | | The condition to use ";" as classpath separator includes a check for the switch "WIN32" which is a target switch. When cross-compiling for a non-windows target, this switch is not present and the separator defaults to ":". It should check for "CMAKE_HOST_WIN32" instead.
* UseJava: Copy resource files before compiling the jar (#13360)Bruno Nova2014-03-201-3/+5
| | | | Co-Author: Mary Ellen Foster <mefoster@gmail.com>
* Help: Fix some erroneous code block markers in Module docs.Stephen Kelly2014-01-071-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are many style errors in these files. This patch fixes only the syntactical errors. The script which ported these to rst tripped on some incorrectly formatted blocks in the original input documentation. Use a new script to find problematic code (and then fix them manually): #!/usr/bin/env python import os rootDir = '.' def checkFile(fname): f = open(fname) lines = f.readlines() started = False counter = 0 for l in lines: if "#" in l: started = True elif started: return lin = l.find("(") if lin != -1 and l.find(")", lin) == -1 and \ not "(To distribute this file outside of CMake, substitute the full" in l: for lp in lines[counter+1:]: if lp == "# ::\n": print "\n\n######### " + fname + "\n\n" print ''.join(lines[max(counter-2, 0):counter+6]) break elif lp == "#\n" : continue break counter += 1 for dirName, subdirList, fileList in os.walk(rootDir): for fname in fileList: checkFile(os.path.join(dirName, fname))
* Convert builtin help to reStructuredText source filesKitware Robot2013-10-151-141/+261
| | | | | | | | Run the convert-help.bash script to convert documentation: ./convert-help.bash "/path/to/CMake-build/bin" Then remove it.
* UseJava: Add support for the jar 'm' (Manifest) optionSimon Levermann2013-09-231-3/+13
|
* UseJava: Update notice of copyright by KitwareBrad King2013-07-171-1/+1
|
* UseJava: Pass sources to javac using response file (#13028)Graham Markall2013-07-161-1/+7
| | | | | | | | The command line string passed to javac can exceed the 8191-character limit on Windows when there are a large number of files to compile. To avoid this, the list of sources is written to a file which is then passed to javac as an argfile. Spaces in paths are dealt with by enclosing each file in quotes, and separating files with a newline.
* UseJava.cmake: document add_jar compat shimMatthew Woehlke2013-06-171-0/+7
| | | | | | | | Document the logic that parses for backward compatibility the old variables that were used to control add_jar prior to named argument support. In particular, document that the reason this logic exists is for backward compatibility, and that new features do not need to add to it.
* Merge topic 'use-java-use-parse-arguments'Brad King2013-05-281-35/+58
|\ | | | | | | | | 81b5fb5 UseJava.cmake: fully use cmake_parse_arguments in add_jar
| * UseJava.cmake: fully use cmake_parse_arguments in add_jarMatthew Woehlke2013-03-281-35/+58
| | | | | | | | | | | | | | Modify add_jar to fully use named arguments, rather than cmake variables, for specifying output names/directories, etc. For backward compatibility, the old variables are still honored if set, although named arguments will override them.
* | Allow using Java in a cross-compilation toolchainGregoire Lejeune2013-05-081-1/+1
|/ | | | | | Since Java is a portable language, if you want to use Java when cross-compiling, UseJava uses the JVM installed on the host. So in this case, we must use set CMAKE_JAVA_INCLUDE_FLAG_SEP for the current host.
* UseJava.cmake: require explicit request to include jarsMatthew Woehlke2013-03-281-18/+40
| | | | | | | | | | Modify add_jar to (partly) use cmake_parse_arguments, and to require using the named argument list INCLUDE_JARS to specify jar files (or jar targets) to use as dependencies when creating a jar. This preserves the ability to have such, while restoring the historic behavior that jar files listed as sources are ignored. (The code now explicitly ignores them, however, rather than adding them to an unused local variable, so that it is more clear that nothing is being done with them.)
* UseJava.cmake: accept jar targets in add_jarMatthew Woehlke2013-03-131-1/+8
| | | | Modify add_jar to also accepts jars by target name.
* UseJava.cmake: fix passing jars to add_jarMatthew Woehlke2013-03-131-1/+5
| | | | | | | | | Fix setting classpath when encountering a jar argument to add_jar to actually set the variable that is used to specify the classpath to javac, instead of just uselessly appending the jar to CMAKE_JAVA_INCLUDE_PATH (which is never used again at the point where it is modified). Also, list jars so specified as dependencies of compiling the java sources for the jar target.
* UseJava.cmake: simplify path logicMatthew Woehlke2013-03-131-11/+11
| | | | | Move logic to determine relative path to .java file to after the file extension check, so that it only executes when it is actually used.
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-59/+59
| | | | | | | | | | | | | | | | | Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
* UseJava: fix find_jar() called with multiple files (#13281)Rolf Eike Beer2012-06-081-2/+2
|
* UseJava: fix typo in variable name (#13135)Rolf Eike Beer2012-04-161-1/+1
| | | | | | | | As Dave Abrahams pointed out CMAKE_CURRENT_SOURCE_PATH is wrong, it's of course CMAKE_CURRENT_SOURCE_DIR. Also wrap the path in quotes so the example would even work if the source path has spaces.
* various typo and formatting fixes in manual pages (#12975)Modestas Vainius2012-02-181-1/+1
| | | | | | | | | | | | | | | | The patch fixes the following lintian warnings: W: cmake-data: manpage-has-errors-from-man usr/share/man/man1/cmakemodules.1.gz 2728: warning: macro `..' not defined I: cmake-data: spelling-error-in-manpage usr/share/man/man1/cmakemodules.1.gz overriden overridden I: cmake-data: spelling-error-in-manpage usr/share/man/man1/cmakemodules.1.gz overriden overridden I: cmake-data: spelling-error-in-manpage usr/share/man/man1/cmakemodules.1.gz explicitely explicitly I: cmake-data: spelling-error-in-manpage usr/share/man/man1/cmakemodules.1.gz jave java W: cmake-data: manpage-has-errors-from-man usr/share/man/man1/cmakeprops.1.gz 1040: warning [p 25, 3.7i]: can't break line W: cmake: manpage-has-errors-from-man usr/share/man/man1/cmake.1.gz 4233: warning [p 85, 1.3i]: can't break line I: cmake: spelling-error-in-manpage usr/share/man/man1/cmake.1.gz overriden overridden I: cmake: spelling-error-in-manpage usr/share/man/man1/cmake.1.gz overriden overridden I: cmake: spelling-error-in-manpage usr/share/man/man1/cmake.1.gz explicitely explicitly I: cmake: spelling-error-in-manpage usr/share/man/man1/cmake.1.gz jave java
* java: Add CMAKE_JAVA_JAR_ENTRY_POINT optional variable.Nicolas Despres2012-02-131-2/+11
| | | | | | Thanks to Matthieu Carpentier. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* java: Add CMAKE_JAVA_TARGET_OUTPUT_DIR optional variable.Nicolas Despres2012-02-131-9/+18
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* java: Factor jar output path.Nicolas Despres2012-02-131-9/+11
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* Modules: Add support for more java archives in add_jar().Andreas Schneider2011-08-291-1/+4
|
* Java: Fix documentation format and indentationAndreas Schneider2011-06-201-169/+162
|
* Java: Use set_property/get_property for target variables.Andreas Schneider2011-06-201-37/+77
|
* Java: Create correct jar archive dependencies.Oliver Buchtala2011-04-041-5/+7
| | | | | | | The command generating the jar file depends on java_class_filelist which is generated by another command. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* Java: Added some dependency magic to avoid recompilations.Oliver Buchtala2011-04-041-2/+10
| | | | | | | Compile java sources within a custom_command using automatically checked file dependencies and create java_class_filelist after java compile. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* Java: Create java_class_filelist only if it does't exist.Oliver Buchtala2011-04-041-1/+3
| | | | Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
* Modules: Added CMake Java support.Andreas Schneider2011-03-291-0/+813
This provides: find_jar add_jar install_jar install_jni_symlink create_javadoc