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
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.
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>
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>