May be usefull for e.g. Debian packages.
- Use git to generate the dist archive. Either use git-archive to
generate the tarball, or keep using cmake -E tar, but use git-ls-files
to get the list of files to pack.
- - For Java, add an option to enable/disable the inclusion of the native
- libraries in the jar file, and avoid to duplicate these files.
Tools:
* Normalizing pointers addresses tool for better diff between logs
* Collective communication algorithms should not crash if used with
improper number of nodes and report the error.
+ Java:
+ * New cmake option, enable_lib_in_jar, to control whether native libraries are
+ copied into simgrid.jar or not (ON by default). Use this option if you want
+ to reduce the size of the installed simgrid.jar, *and* the native libraries
+ are kept installed elsewhere.
+
Build System:
* Supernovae build mode is definitively removed. It was used to improve
inlining and inter-module optimizations. It is nowadays superseded by
# Java examples
if(enable_java)
if(WIN32)
- set(TESH_CLASSPATH "${CMAKE_BINARY_DIR}/examples/java/\;${SIMGRID_JAR}")
+ set(TESH_CLASSPATH "${CMAKE_BINARY_DIR}/examples/java/\;${SIMGRID_FULL_JAR}")
else()
- set(TESH_CLASSPATH "${CMAKE_BINARY_DIR}/examples/java/:${SIMGRID_JAR}")
+ set(TESH_CLASSPATH "${CMAKE_BINARY_DIR}/examples/java/:${SIMGRID_FULL_JAR}")
endif()
ADD_TEST(java-async ${TESH_COMMAND} ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/async/async.tesh)
ADD_TEST(java-bittorrent ${TESH_COMMAND} ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/bittorrent/bittorrent.tesh)
# Scala examples
if(enable_scala)
if(WIN32)
- set(TESH_CLASSPATH "${CMAKE_BINARY_DIR}/examples/scala/\;${SIMGRID_JAR}\;${SCALA_JARS}")
+ set(TESH_CLASSPATH "${CMAKE_BINARY_DIR}/examples/scala/\;${SIMGRID_FULL_JAR}\;${SCALA_JARS}")
else()
- set(TESH_CLASSPATH "${CMAKE_BINARY_DIR}/examples/scala/:${SIMGRID_JAR}:${SCALA_JARS}")
+ set(TESH_CLASSPATH "${CMAKE_BINARY_DIR}/examples/scala/:${SIMGRID_FULL_JAR}:${SCALA_JARS}")
endif()
ADD_TEST(scala-bypass ${TESH_COMMAND} ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/scala --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/scala ${CMAKE_HOME_DIRECTORY}/examples/scala/master_slave_bypass/bypass.tesh)
endif()
if(enable_java)
+ if(enable_lib_in_jar)
+ set(SIMGRID_JAR_TO_INSTALL "${SIMGRID_FULL_JAR}")
+ else()
+ set(SIMGRID_JAR_TO_INSTALL "${SIMGRID_JAR}")
+ endif()
install(TARGETS simgrid-java
DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/)
- install(FILES ${SIMGRID_JAR}
- DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/java/)
+ install(FILES ${SIMGRID_JAR_TO_INSTALL}
+ DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/java/
+ RENAME simgrid.jar)
endif()
# include files
## Files to include in simgrid.jar
##
set(SIMGRID_JAR "${CMAKE_BINARY_DIR}/simgrid.jar")
+set(SIMGRID_FULL_JAR "${CMAKE_BINARY_DIR}/simgrid_full.jar")
set(MANIFEST_IN_FILE "${CMAKE_HOME_DIRECTORY}/src/bindings/java/MANIFEST.MF.in")
set(MANIFEST_FILE "${CMAKE_BINARY_DIR}/src/bindings/java/MANIFEST.MF")
COMMAND ${CMAKE_COMMAND} -E copy ${MANIFEST_IN_FILE} ${MANIFEST_FILE}
COMMAND ${CMAKE_COMMAND} -E echo "Specification-Version: \\\"${SIMGRID_VERSION_MAJOR}.${SIMGRID_VERSION_MINOR}.${SIMGRID_VERSION_PATCH}\\\"" >> ${MANIFEST_FILE}
COMMAND ${CMAKE_COMMAND} -E echo "Implementation-Version: \\\"${GIT_VERSION}\\\"" >> ${MANIFEST_FILE}
- COMMAND ${JAVA_ARCHIVE} -uvmf ${MANIFEST_FILE} ${SIMGRID_JAR} "NATIVE"
+ COMMAND ${JAVA_ARCHIVE} -uvmf ${MANIFEST_FILE} ${SIMGRID_JAR}
+ COMMAND ${CMAKE_COMMAND} -E copy ${SIMGRID_JAR} ${SIMGRID_FULL_JAR}
+ COMMAND ${JAVA_ARCHIVE} -uvf ${SIMGRID_FULL_JAR} "NATIVE"
COMMAND ${CMAKE_COMMAND} -E remove ${SIMGRID_JAR}_finalized
COMMAND ${CMAKE_COMMAND} -E touch ${SIMGRID_JAR}_finalized
)
mark_as_advanced(enable_print_message)
option(enable_model-checking "Turn this on to experiment with our prototype of model-checker (hinders the simulation's performance even if turned of at runtime)" off)
option(enable_lib_static "" off)
+option(enable_lib_in_jar "Whether the native libraries are bundled into the Java jar file" on)
option(enable_jedule "Jedule output of SimDAG." off)
option(enable_debug "Turn this off to remove all debug messages at compile time (faster, but no debug activable)" on)
option(enable_msg_deprecated "This option enable the use of msg deprecated functions" off)
message(" Compile Smpi f77 ....: ${SMPI_F2C}")
message(" Compile Smpi f90 ....: ${SMPI_F90}")
message(" Compile Static ......: ${enable_lib_static}")
+if(enable_java)
+ message(" Native lib in jar ...: ${enable_lib_in_jar}")
+endif()
message("")
message(" Maintainer mode .....: ${enable_maintainer_mode}")
message(" Model checking ......: ${HAVE_MC}")