Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Another fix in build depends.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 1 Feb 2013 10:47:01 +0000 (11:47 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 1 Feb 2013 11:35:13 +0000 (12:35 +0100)
Hope it is correct now.

Workaround a bug in cmake -E touch, where the modifiction time is
truncated when file exists.

18 files changed:
buildtools/Cmake/MakeLib.cmake
examples/java/async/CMakeLists.txt
examples/java/bittorrent/CMakeLists.txt
examples/java/chord/CMakeLists.txt
examples/java/cloud/CMakeLists.txt
examples/java/commTime/CMakeLists.txt
examples/java/io/CMakeLists.txt
examples/java/kademlia/CMakeLists.txt
examples/java/master_slave_bypass/CMakeLists.txt
examples/java/master_slave_kill/CMakeLists.txt
examples/java/masterslave/CMakeLists.txt
examples/java/migration/CMakeLists.txt
examples/java/mutualExclusion/CMakeLists.txt
examples/java/pingPong/CMakeLists.txt
examples/java/priority/CMakeLists.txt
examples/java/startKillTime/CMakeLists.txt
examples/java/suspend/CMakeLists.txt
examples/java/tracing/CMakeLists.txt

index 37a020c..dc94f02 100644 (file)
@@ -72,21 +72,23 @@ if(enable_java)
   add_custom_command(
     COMMENT "Finalize simgrid.jar..."
     OUTPUT ${SIMGRID_JAR}_finalized
-    DEPENDS simgrid SG_java ${SIMGRID_JAR} ${MANIFEST_FILE}
+    DEPENDS ${SIMGRID_JAR} ${MANIFEST_FILE}
+            ${CMAKE_BINARY_DIR}/lib/${LIBSIMGRID_SO}
+            ${CMAKE_BINARY_DIR}/lib/${LIBSG_JAVA_SO}
             ${CMAKE_HOME_DIRECTORY}/COPYING
             ${CMAKE_HOME_DIRECTORY}/ChangeLog
             ${CMAKE_HOME_DIRECTORY}/ChangeLog.SimGrid-java
-    WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
     COMMAND ${CMAKE_COMMAND} -E remove_directory "NATIVE"
     COMMAND ${CMAKE_COMMAND} -E make_directory "${JSG_BUNDLE}"
-    COMMAND ${CMAKE_COMMAND} -E copy "./lib/${LIBSIMGRID_SO}" "${JSG_BUNDLE}"
+    COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/lib/${LIBSIMGRID_SO}" "${JSG_BUNDLE}"
     COMMAND ${CMAKE_STRIP} -S "${JSG_BUNDLE}/${LIBSIMGRID_SO}"
-    COMMAND ${CMAKE_COMMAND} -E copy "./lib/${LIBSG_JAVA_SO}" "${JSG_BUNDLE}"
+    COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/lib/${LIBSG_JAVA_SO}" "${JSG_BUNDLE}"
     COMMAND ${CMAKE_STRIP} -S "${JSG_BUNDLE}/${LIBSG_JAVA_SO}"
     COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_HOME_DIRECTORY}/COPYING" "${JSG_BUNDLE}"
     COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_HOME_DIRECTORY}/ChangeLog" "${JSG_BUNDLE}"
     COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_HOME_DIRECTORY}/ChangeLog.SimGrid-java" "${JSG_BUNDLE}"
     COMMAND ${JAVA_ARCHIVE} -uvmf ${MANIFEST_FILE} ${SIMGRID_JAR} "NATIVE"
+    COMMAND ${CMAKE_COMMAND} -E remove ${SIMGRID_JAR}_finalized
     COMMAND ${CMAKE_COMMAND} -E touch ${SIMGRID_JAR}_finalized
     )
   add_custom_target(SG_java_jar_finalize DEPENDS ${SIMGRID_JAR}_finalized)
index 41082fe..18d4de1 100644 (file)
@@ -13,9 +13,10 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} ${SIMGRID_JAR}
+    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
+    COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
   )
   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
index a8a46f2..a245baa 100644 (file)
@@ -15,9 +15,10 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} ${SIMGRID_JAR}
+    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
+    COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
   )
   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
index 50c534f..90167e8 100644 (file)
@@ -17,9 +17,10 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} ${SIMGRID_JAR}
+    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
+    COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
   )
   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
index d3ef5f6..9dbb0d1 100644 (file)
@@ -12,9 +12,10 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} ${SIMGRID_JAR}
+    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
+    COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
   )
   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
index 2404c0f..320b5c8 100644 (file)
@@ -12,9 +12,10 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} ${SIMGRID_JAR}
+    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
+    COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
   )
   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
index 1d1e5ab..767e4d6 100644 (file)
@@ -10,9 +10,10 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} ${SIMGRID_JAR}
+    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
+    COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
   )
   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
index b6cdc1a..8b3833d 100644 (file)
@@ -20,9 +20,10 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} ${SIMGRID_JAR}
+    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
+    COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
   )
   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
index ae5fea7..9b18ca4 100644 (file)
@@ -12,9 +12,10 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} ${SIMGRID_JAR}
+    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
+    COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
   )
   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
index c4ff8be..34e5b26 100644 (file)
@@ -12,9 +12,10 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} ${SIMGRID_JAR}
+    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
+    COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
   )
   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
index e0173a3..c3083f6 100644 (file)
@@ -13,9 +13,10 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} ${SIMGRID_JAR}
+    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
+    COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
   )
   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
index 383a02d..72108f0 100644 (file)
@@ -11,9 +11,10 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} ${SIMGRID_JAR}
+    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
+    COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
   )
   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
index 9e5b45a..4593c8c 100644 (file)
@@ -14,9 +14,10 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} ${SIMGRID_JAR}
+    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
+    COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
   )
   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
index 95b1361..8756c21 100644 (file)
@@ -12,9 +12,10 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} ${SIMGRID_JAR}
+    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
+    COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
   )
   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
index 6d838dd..a93beec 100644 (file)
@@ -10,9 +10,10 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} ${SIMGRID_JAR}
+    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
+    COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
   )
   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
index 46ea114..0a9716a 100644 (file)
@@ -11,9 +11,10 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} ${SIMGRID_JAR}
+    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
+    COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
   )
   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
index 8c0e73c..0ac2dfd 100644 (file)
@@ -11,9 +11,10 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} ${SIMGRID_JAR}
+    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
+    COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
   )
   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
index 1ae946b..f035001 100644 (file)
@@ -12,9 +12,10 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} ${SIMGRID_JAR}
+    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
+    COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
   )
   add_custom_target(${example} ALL DEPENDS ${example}_compiled)