Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add a test case for the JVM slaying our semaphores
[simgrid.git] / teshsuite / java / semaphore / CMakeLists.txt
diff --git a/teshsuite/java/semaphore/CMakeLists.txt b/teshsuite/java/semaphore/CMakeLists.txt
new file mode 100644 (file)
index 0000000..e86706b
--- /dev/null
@@ -0,0 +1,40 @@
+set(example java_semaphore_gc)
+set(sources
+  ${CMAKE_CURRENT_SOURCE_DIR}/SemaphoreGC.java
+  )
+
+if(enable_java)
+  add_custom_command(
+    COMMENT "Building ${example}..."
+    OUTPUT ${example}_compiled
+    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)
+endif()
+
+set(tesh_files
+  ${tesh_files}
+  ${CMAKE_CURRENT_SOURCE_DIR}/semaphore_gc.tesh
+  PARENT_SCOPE
+  )
+set(xml_files
+  ${xml_files}
+  PARENT_SCOPE
+  )
+set(examples_src
+  ${examples_src}
+  ${sources}
+  PARENT_SCOPE
+  )
+set(bin_files
+  ${bin_files}
+  PARENT_SCOPE
+  )
+set(txt_files
+  ${txt_files}
+  PARENT_SCOPE
+  )