Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cleanups in java examples (2/2)
[simgrid.git] / examples / java / commTime / CMakeLists.txt
1 set(example java_commTime)
2 set(sources
3   ${CMAKE_CURRENT_SOURCE_DIR}/CommTimeTest.java
4   ${CMAKE_CURRENT_SOURCE_DIR}/FinalizeTask.java
5   ${CMAKE_CURRENT_SOURCE_DIR}/Master.java
6   ${CMAKE_CURRENT_SOURCE_DIR}/Slave.java
7   )
8
9 if(enable_java)
10   add_custom_command(
11     COMMENT "Building ${example}..."
12     OUTPUT ${example}_compiled
13     DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
14     COMMAND ${JAVA_COMPILE} -classpath ${SIMGRID_JAR}
15                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
16     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
17     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
18   )
19   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
20 endif()
21
22 set(tesh_files
23   ${tesh_files}
24   ${CMAKE_CURRENT_SOURCE_DIR}/commtime.tesh
25   PARENT_SCOPE)
26 set(xml_files
27   ${xml_files}
28   ${CMAKE_CURRENT_SOURCE_DIR}/commTimeDeployment.xml
29   PARENT_SCOPE)
30 set(examples_src
31   ${examples_src}
32   ${sources}
33   PARENT_SCOPE)