Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Comment the java stripping commands for now
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 24 Nov 2015 19:16:57 +0000 (20:16 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 24 Nov 2015 19:20:52 +0000 (20:20 +0100)
Comment the lines instead of removing them, so that we can easily
reintroduce this in the future (the Mac workaround is not trivial)

This reverts and modifies commit 82c8c18086305a434d8965730f7a1ea93ddf141d.

tools/cmake/Java.cmake

index 8e0ee2f..275f1b3 100644 (file)
@@ -101,6 +101,14 @@ add_custom_command(
 ###
 
 if(enable_lib_in_jar)
+
+  # Stripping disabled for the time being to make Java debuggable. We should introduce a proper option for that.
+  #find_program(STRIP_COMMAND strip)
+  #mark_as_advanced(STRIP_COMMAND)
+  #if(NOT STRIP_COMMAND)
+  #  set(STRIP_COMMAND "cmake -E echo (strip not found)")
+  #endif()
+  
   set(SG_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
   
   if(${SG_SYSTEM_NAME} MATCHES "kFreeBSD")
@@ -132,6 +140,12 @@ if(enable_lib_in_jar)
     COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/lib/${LIBSIMGRID_SO}      ${JAVA_NATIVE_PATH}
     COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/lib/${LIBSIMGRID_JAVA_SO} ${JAVA_NATIVE_PATH}
     COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/lib/${LIBSURF_JAVA_SO}    ${JAVA_NATIVE_PATH}
+    
+    ## strip seems to fail on Mac on binaries that are already stripped.
+    ## It then spits: "symbols referenced by indirect symbol table entries that can't be stripped"
+    #COMMAND ${STRIP_COMMAND} ${JAVA_NATIVE_PATH}/${LIBSIMGRID_SO}      || true
+    #COMMAND ${STRIP_COMMAND} ${JAVA_NATIVE_PATH}/${LIBSIMGRID_JAVA_SO} || true
+    #COMMAND ${STRIP_COMMAND} ${JAVA_NATIVE_PATH}/${LIBSURF_JAVA_SO}    || true
 
     COMMAND ${JAVA_ARCHIVE} -uvf ${SIMGRID_JAR}  NATIVE
     COMMAND ${CMAKE_COMMAND} -E remove_directory NATIVE