| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| | |
Some modules define an intermediate global scope visible variables
to access "resource" files from functions.
Now these variables could be eliminated.
|
| |
| |
| |
| | |
For both classpath and sourcepath.
|
| | |
|
|/
|
|
|
| |
It is currently only defined within the add_jar function, but is needed
inside other functions in this module.
|
|
|
|
|
| |
Replace use of the deprecated `ADDITIONAL_MAKE_CLEAN_FILES` directory property
with the new `ADDITIONAL_CLEAN_FILES` directory property.
|
|
|
| |
Co-Authored-By: Craig Scott <craig.scott@crascit.com>
|
|
|
|
| |
Fixes: #18836
|
|
|
|
| |
Fixes: #18683
|
| |
|
|\
| |
| |
| | |
Fix conflicts by combining the changes from both sides.
|
| |
| |
| |
| |
| |
| |
| | |
* new version format
* new registry layout on Windows
Fixes: #17938
|
|/
|
|
| |
Found via `codespell -q 3 -I ../cmake-whitelist.txt`.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Build artifacts go to CMAKE_CURRENT_BINARY_DIR subdirectory in all cases.
Fixes: #17341
|
|
|
|
| |
Fixes: #17316
|
|
|
|
|
|
|
| |
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'
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Author: dancing-leaves <dancing-leaves@users.noreply.github.com>
|
|
|
|
|
| |
The Debian package checker tool (lintian) detected several typos in
CMake.
|
|
|
|
| |
It is not `CLASS_DIR`.
|
|
|
|
| |
Preserve semicolons in the value.
|
| |
|
|
|
|
| |
Add a `create_javah` API.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Co-Author: Mary Ellen Foster <mefoster@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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))
|
|
|
|
|
|
|
|
| |
Run the convert-help.bash script to convert documentation:
./convert-help.bash "/path/to/CMake-build/bin"
Then remove it.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| | |
81b5fb5 UseJava.cmake: fully use cmake_parse_arguments in add_jar
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
| |
Modify add_jar to also accepts jars by target name.
|
|
|
|
|
|
|
|
|
| |
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.
|