Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'coverity_scan' of github.com:mquinson/simgrid
[simgrid.git] / examples / java / async / CMakeLists.txt
index 41082fe..6aa09fe 100644 (file)
@@ -1,5 +1,3 @@
-cmake_minimum_required(VERSION 2.6)
-
 set(example java_async)
 set(sources
   ${CMAKE_CURRENT_SOURCE_DIR}/AsyncTest.java
@@ -13,9 +11,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)
@@ -24,24 +23,16 @@ endif()
 set(tesh_files
   ${tesh_files}
   ${CMAKE_CURRENT_SOURCE_DIR}/async.tesh
-  PARENT_SCOPE
-  )
+  PARENT_SCOPE)
 set(xml_files
   ${xml_files}
   ${CMAKE_CURRENT_SOURCE_DIR}/asyncDeployment.xml
-  PARENT_SCOPE
-  )
+  PARENT_SCOPE)
 set(examples_src
   ${examples_src}
   ${sources}
-  PARENT_SCOPE
-  )
-set(bin_files
-  ${bin_files}
-  PARENT_SCOPE
-  )
+  PARENT_SCOPE)
 set(txt_files
   ${txt_files}
   ${CMAKE_CURRENT_SOURCE_DIR}/README
-  PARENT_SCOPE
-  )
+  PARENT_SCOPE)