Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'S4U'
[simgrid.git] / examples / java / kademlia / CMakeLists.txt
1 set(example java_kademlia)
2 set(sources
3   ${CMAKE_CURRENT_SOURCE_DIR}/Answer.java
4   ${CMAKE_CURRENT_SOURCE_DIR}/Bucket.java
5   ${CMAKE_CURRENT_SOURCE_DIR}/Common.java
6   ${CMAKE_CURRENT_SOURCE_DIR}/Contact.java
7   ${CMAKE_CURRENT_SOURCE_DIR}/FindNodeAnswerTask.java
8   ${CMAKE_CURRENT_SOURCE_DIR}/FindNodeTask.java
9   ${CMAKE_CURRENT_SOURCE_DIR}/Kademlia.java
10   ${CMAKE_CURRENT_SOURCE_DIR}/KademliaTask.java
11   ${CMAKE_CURRENT_SOURCE_DIR}/Node.java
12   ${CMAKE_CURRENT_SOURCE_DIR}/PingAnswerTask.java
13   ${CMAKE_CURRENT_SOURCE_DIR}/PingTask.java
14   ${CMAKE_CURRENT_SOURCE_DIR}/RoutingTable.java
15   )
16
17 if(enable_java)
18   add_custom_command(
19     COMMENT "Building ${example}..."
20     OUTPUT ${example}_compiled
21     DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
22     COMMAND ${JAVA_COMPILE} -classpath ${SIMGRID_JAR}
23                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
24     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
25     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
26   )
27   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
28 endif()
29
30 set(tesh_files
31   ${tesh_files}
32   ${CMAKE_CURRENT_SOURCE_DIR}/kademlia.tesh
33   PARENT_SCOPE
34   )
35 set(xml_files
36   ${xml_files}
37   ${CMAKE_CURRENT_SOURCE_DIR}/kademlia.xml
38   PARENT_SCOPE
39   )
40 set(examples_src
41   ${examples_src}
42   ${sources}
43   PARENT_SCOPE
44   )
45 set(bin_files
46   ${bin_files}
47   PARENT_SCOPE
48   )
49 set(txt_files
50   ${txt_files}
51   PARENT_SCOPE
52   )