Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
dadb6c2f837abc763776a58352358c9a5c716453
[simgrid.git] / examples / java / pingPong / CMakeLists.txt
1 set(example java_pingPong)
2 set(sources ${CMAKE_CURRENT_SOURCE_DIR}/PingPongTest.java
3             ${CMAKE_CURRENT_SOURCE_DIR}/PingPongTask.java
4             ${CMAKE_CURRENT_SOURCE_DIR}/Receiver.java
5             ${CMAKE_CURRENT_SOURCE_DIR}/Sender.java)
6
7 if(enable_java)
8   add_custom_command(
9     COMMENT "Building ${example}..."
10     OUTPUT ${example}_compiled
11     DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
12     COMMAND ${JAVA_COMPILE} -classpath ${SIMGRID_JAR}
13                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
14     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
15     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
16   )
17   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
18 endif()
19
20 set(tesh_files
21   ${tesh_files}
22   ${CMAKE_CURRENT_SOURCE_DIR}/pingpong.tesh
23   PARENT_SCOPE)
24 set(xml_files
25   ${xml_files}
26   ${CMAKE_CURRENT_SOURCE_DIR}/pingPongDeployment.xml
27   PARENT_SCOPE)
28 set(examples_src
29   ${examples_src}
30   ${sources}
31   PARENT_SCOPE)