Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
reindent ... this time with the appropriate options
[simgrid.git] / examples / java / mutualExclusion / CMakeLists.txt
index 9e5b45ad0e130574435981e030caa931787786f9..4593c8c40c3c6b57b6368954eb4e056496853c71 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)