Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Run Java tests from build directory, instead of source directory.
[simgrid.git] / examples / java / priority / CMakeLists.txt
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)