Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'coverity_scan' of github.com:mquinson/simgrid
[simgrid.git] / examples / java / pingPong / CMakeLists.txt
1 set(example java_pingPong)
2 set(sources
3   ${CMAKE_CURRENT_SOURCE_DIR}/PingPongTask.java
4   ${CMAKE_CURRENT_SOURCE_DIR}/PingPongTest.java
5   ${CMAKE_CURRENT_SOURCE_DIR}/Receiver.java
6   ${CMAKE_CURRENT_SOURCE_DIR}/Sender.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}/pingpong.tesh
25   PARENT_SCOPE)
26 set(xml_files
27   ${xml_files}
28   ${CMAKE_CURRENT_SOURCE_DIR}/pingPongDeployment.xml
29   PARENT_SCOPE)
30 set(examples_src
31   ${examples_src}
32   ${sources}
33   PARENT_SCOPE)