Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / examples / java / mutualExclusion / CMakeLists.txt
index 9e5b45a..3ec0b1f 100644 (file)
@@ -1,5 +1,3 @@
-cmake_minimum_required(VERSION 2.6)
-
 set(example java_mutualExclusion)
 set(sources
   ${CMAKE_CURRENT_SOURCE_DIR}/Coordinator.java
@@ -14,9 +12,10 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} ${SIMGRID_JAR}
-    COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
+    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
+    COMMAND ${JAVA_COMPILE} -classpath ${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)
@@ -30,7 +29,6 @@ set(tesh_files
 set(xml_files
   ${xml_files}
   ${CMAKE_CURRENT_SOURCE_DIR}/mutex_centralized_deployment.xml
-  ${CMAKE_CURRENT_SOURCE_DIR}/ring3.xml
   PARENT_SCOPE
   )
 set(examples_src