summaryrefslogtreecommitdiff
path: root/Modules/UseJava.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Help: Replace link with its permanent redirectBrad King2023-03-181-1/+1
|
* Merge topic 'doc-improvements'Brad King2022-11-101-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | d4d1f85297 Help: Move a note about arguments and genexes into include file 968224484f Help: Drop unused `PROPERTY_GENEX` replace from `prop_tgt/INTERFACE_*` files 65457e4fae Help: Add _See Also_ sections to related CMake commands c86ec79d07 Help: Use direct refs to genexes instead of ``$<GENEX-NAME>`` 8c6274326d Help: Use CMake highlighting for command synopsis c356a94512 Help: Use monospaced font for a genex name in a section title f98c8707f4 Help: Use `code-block:: cmake` instead of `::` for sub-commands descriptions 2ba351ca4f Help: ``CMake`` → CMake ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7873
| * Help: ``CMake`` → CMakeAlex Turbov2022-11-071-1/+1
| |
* | Help: Fix some redirects reported with sphinx linkcheckAlex Turbov2022-11-071-1/+1
|/ | | | Mostly it's about replace `http:` with `https:` protocol.
* Help: UseJava reorganizationMarc Chevrier2021-06-241-351/+454
| | | | Fixes: #22155
* UseJava: Add version for RESOURCES optionMarc Chevrier2021-05-301-4/+8
|
* UseJava: Avoid non-word "compilability" in documentationBrad King2021-05-121-1/+1
| | | | | Also fix spelling in the release note from commit 3e03f359a7 (UseJava: Add RESOURCES with NAMESPACE to add_jar(), 2021-04-27).
* UseJava: Add RESOURCES with NAMESPACE to add_jar()Smit tay2021-05-101-7/+96
| | | | | | | | | | | add_jar() currently requires (undocumented) that resources be supplied as relative paths. The resources *may* then end up in a path which does not reflect the original path particularly when performing out-of-source builds. This change adds a RESOURCE (and NAMESPACE) parameter and a function to add the names resources into the named namespace within the jar- and thus address both of these problems. Fixes: #22101
* UseJava: enable exportation of native headers targetMarc Chevrier2020-12-291-4/+51
|
* Help: Add `.. versionadded` directives to module docsNikita Nemkin2020-12-021-12/+32
| | | | Issue: #19715
* UseJava: Move helper scripts to subdirectoryNikita Nemkin2020-11-121-3/+3
| | | | Also, exclude them from the help module index.
* UseJava: Quote -classpath argument correctly on more platformsBrad King2020-04-101-3/+9
| | | | | | | | | | Add the `VERBATIM` option to our `add_custom_command` calls so that all arguments are correctly escaped for the shell. Otherwise when using a POSIX shell on Windows, the `-classpath` separator is `;` and without quoting ends the command. Fixes: #20567 Inspired-by: Nevyn Bengtsson <nevyn.jpg@gmail.com>
* UseJava: clean class files from previous buildsAlexey Karndshev2020-04-061-2/+9
| | | | | | | | If java_class_filelist exists, remove previous class files before building the new ones. If java_sources content has changed, clean and rebuild the class files of the target. Fixes: #20377
* Merge topic 'function-var-current'Kyle Edwards2019-12-121-2/+1
|\ | | | | | | | | | | | | | | | | | | 24fdd51f45 Refactor: Replace CMAKE_CURRENT_LIST_DIR with CMAKE_CURRENT_FUNCTION_LIST_DIR 90e3e2a777 cmFunctionCommand: Introduce `CMAKE_CURRENT_FUNCTION*` variables dd54290dab Refactor: Modernize `function` command Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !4000
| * Refactor: Replace CMAKE_CURRENT_LIST_DIR with CMAKE_CURRENT_FUNCTION_LIST_DIRAlex Turbov2019-12-101-2/+1
| | | | | | | | | | | | Some modules define an intermediate global scope visible variables to access "resource" files from functions. Now these variables could be eliminated.
* | UseJava: Use correct path separator in javadocNathan Burles2019-11-201-20/+4
| | | | | | | | For both classpath and sourcepath.
* | UseJava: Use list(APPEND) to simplify javadoc option constructionNathan Burles2019-11-201-10/+11
| |
* | UseJava: Extract the path separator to module levelNathan Burles2019-11-201-15/+10
|/ | | | | It is currently only defined within the add_jar function, but is needed inside other functions in this module.
* UseJava: Use ADDITIONAL_CLEAN_FILES for cleaningSebastian Holtermann2019-05-151-1/+2
| | | | | Replace use of the deprecated `ADDITIONAL_MAKE_CLEAN_FILES` directory property with the new `ADDITIONAL_CLEAN_FILES` directory property.
* UseJava: Refactor documentation for better formattingRobert Maynard2019-05-151-294/+229
| | | Co-Authored-By: Craig Scott <craig.scott@crascit.com>
* UseJava: clean-up if() expressionsMarc Chevrier2019-01-281-147/+147
| | | | Fixes: #18836
* UseJava: add_jar: rebuild jar on dependencies changesMarc Chevrier2018-12-111-1/+1
| | | | Fixes: #18683
* Help: Convert remaining modules to block-style commentsKitware Robot2018-10-221-432/+433
|
* Merge branch 'backport-java-new-packaging' into java-new-packagingBrad King2018-04-251-5/+5
|\ | | | | | | Fix conflicts by combining the changes from both sides.
| * FindJava, FindJNI, UseJava: update for version 10 supportMarc Chevrier2018-04-251-5/+5
| | | | | | | | | | | | | | * new version format * new registry layout on Windows Fixes: #17938
* | MAINT: Misc. typosluz.paz2018-02-131-1/+1
|/ | | | Found via `codespell -q 3 -I ../cmake-whitelist.txt`.
* add_jar: add option GENERATE_NATIVE_HEADERSMarc Chevrier2018-01-221-1/+73
|
* Fix trivial typos in textluzpaz2017-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some are user facing. Found using codespell -q 3 --skip="./Utilities" -I .cmake-whitelist.txt` whereby the whitelist contained: ans dum helpfull emmited emmitted buil iff isnt nto ot pathes substract te todays upto whitespaces
* UseJava: add_jar OUTPUT_DIR option used only for jar generation.Marc Chevrier2017-10-121-4/+4
| | | | | | Build artifacts go to CMAKE_CURRENT_BINARY_DIR subdirectory in all cases. Fixes: #17341
* UseJava: OUTPUT_DIR must exists in all cases.Marc Chevrier2017-10-101-0/+2
| | | | Fixes: #17316
* Use string(APPEND) in ModulesDaniel Pfeifer2017-05-171-1/+1
| | | | | | | Automate with: find Modules -type f -print0 | xargs -0 perl -i -0pe \ 's/set\(([a-zA-Z0-9_\$\{\}]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
* UseJava: Support namespaced exportsMatthew Woehlke2017-04-211-15/+21
| | | | | | | | | Add NAMESPACE option to export_jars and install_jar_exports. Import JAR's as imported static libraries rather than custom targets, as this is necessary to allow the imported targets to contain ':' in their names. (This also means they won't show up in VS projects, which is more consistent with other imported targets.) Also, improve the documentation to be more stylistically consistent with documentation elsewhere.
* Don't include CMakeParseArgumentsDaniel Pfeifer2017-01-111-2/+0
| | | | | | | | | | | | The cmake_parse_arguments command is builtin with version 3.5. The CMakeParseArguments module is empty and exists for backwards compatibility with CMake 3.4 and lower. Remove the includes of CMakeParseArguments from CMake's modules. The modules are always used with the current version of CMake. Leave the includes in the tests, as the tests may be run with an older version of CMake.
* Simplify CMake per-source license noticesBrad King2016-09-271-15/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* Use string(APPEND) in ModulesDaniel Pfeifer2016-07-281-3/+3
| | | | | | | Automate with: find Modules -type f -print0 | xargs -0 perl -i -0pe \ 's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
* UseJava: Fix race condition creating java class listMatthew Woehlke2016-06-091-5/+5
| | | | | | | | | | | | | | | | | Modify logic to unconditionally create an empty class list response file to instead only create the empty file if no classes are being compiled. Otherwise, the response file is created via a custom command that generates the correct list. This fixes a race condition on certain systems (e.g. HFS on OS X) where the dependency for creating the "correct" list can have the "same" (due to limited precision of the filesystem) timestamp as the empty file created at configure time, resulting in an empty class list being incorrectly used to invoke `jar` (resulting in `jar` being unhappy that it was not given any input files). Although one would have some hope that this doesn't affect "real" projects, it definitely does affect the JavaExportImport unit test, causing the same to fail randomly when run on an HFS partition.
* UseJava: Add infrastructure to export targetsMatthew Woehlke2016-06-071-0/+153
| | | | | | Add additional functions to UseJava.cmake to create "exported" targets, similar to those of C/C++ libraries. In support of this, ensure that the JAR_FILE property of jar targets is always an absolute path.
* UseJava: Fix grammar error in documentationMatthew Woehlke2016-05-311-1/+1
|
* UseJava: use CMAKE_COMMAND instead of direct cmake callBrad King2016-04-061-1/+1
| | | | Author: dancing-leaves <dancing-leaves@users.noreply.github.com>
* Fix spelling typos in comments and documentation (#16037)Felix Geyer2016-03-291-1/+1
| | | | | The Debian package checker tool (lintian) detected several typos in CMake.
* UseJava: Fix documented name of `CLASSDIR` property (#15936)Brad King2016-01-261-1/+1
| | | | It is not `CLASS_DIR`.
* UseJava: Fix create_javah CLASSPATH handling on WindowsMarc Chevrier2016-01-191-2/+2
| | | | Preserve semicolons in the value.
* UseJava: Allow relative path to manifest file just as with other sourcesMarc Chevrier2015-12-031-1/+1
|
* UseJava: Add support for javah toolMarc Chevrier2015-08-211-0/+157
| | | | Add a `create_javah` API.
* UseJava: Teach install_jar new DESTINATION and COMPONENT optionsMarc Chevrier2015-08-041-6/+48
|
* UseJava: Teach add_jar to support file syntax for sourcesMarc Chevrier2015-08-041-9/+25
|
* UseJava: Fix add_jar argument parsing (#14655)Mark Studenka2015-03-201-11/+11
| | | | | | | Since commit v2.8.11~63^2 (UseJava.cmake: require explicit request to include jars, 2013-03-26) the argument parsing always overrides the variable settings even if the corresponding arguments are not passed. Re-order logic to fix this.
* 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))