make JAVAC_OPTIONS configurable
The file Wrapping/Java/CMakeLists.txt
contains
# javac runs out memory on Mac so increase heapsize
if(APPLE)
set(JAVAC_OPTIONS -J-Xmx512m)
endif()
Now, that's a bit arbitrary. Why only on APPLE
? Why 512m
? In fact, on Debian we had to increase this to 1024m
, see https://anonscm.debian.org/cgit/debian-science/packages/vtk6.git/tree/debian/patches/100_javac-heap.patch.
It'd suggest to make this configurable, perhaps via cmake -DJAVAC_OPTIONS=-J-Xmx512m
.