Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[examples] add s4u-actor-kill-pid example
[simgrid.git] / examples / s4u / CMakeLists.txt
1 foreach (example actor-create actor-daemon actor-join actor-kill actor-kill-pid
2                  actor-lifetime actor-migration actor-suspend actor-yield
3                  app-chainsend app-masterworker app-pingpong app-token-ring
4                  async-wait async-waitany async-waitall
5                  cloud-capping cloud-migration cloud-simple
6                  energy-exec energy-boot energy-link energy-vm
7                  exec-async exec-basic exec-dvfs exec-monitor exec-ptask exec-remote
8                  io-file-system io-file-remote io-storage-raw
9                  mutex
10                  platform-properties plugin-hostload 
11                  replay-comm replay-storage
12                  trace-platform)
13   add_executable       (s4u-${example}  ${example}/s4u-${example}.cpp)
14   target_link_libraries(s4u-${example}  simgrid)
15   set_target_properties(s4u-${example}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${example})
16
17   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${example}/s4u-${example}.tesh)
18   set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/${example}/s4u-${example}.cpp)
19 endforeach()
20
21 # CHORD EXAMPLE
22 add_executable       (s4u-dht-chord dht-chord/s4u-dht-chord.cpp dht-chord/s4u-dht-chord-node.cpp)
23 target_link_libraries(s4u-dht-chord simgrid)
24 set_target_properties(s4u-dht-chord PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/dht-chord)
25 foreach (file s4u-dht-chord s4u-dht-chord-node)
26   set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/${file}.cpp)
27 endforeach()
28 set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/s4u-dht-chord.hpp)
29
30 # KADEMLIA EXAMPLE
31 add_executable       (s4u-dht-kademlia dht-kademlia/s4u-dht-kademlia.cpp dht-kademlia/node.cpp 
32                       dht-kademlia/routing_table.cpp dht-kademlia/answer.cpp)
33 target_link_libraries(s4u-dht-kademlia simgrid)
34 set_target_properties(s4u-dht-kademlia PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/dht-kademlia)
35 foreach (file answer routing_table node s4u-dht-kademlia)
36   set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/${file}.cpp 
37                                      ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/${file}.hpp)
38 endforeach()
39 set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/message.hpp)
40
41 # BITTORRENT EXAMPLE
42 add_executable       (s4u-bittorrent app-bittorrent/s4u-bittorrent.cpp app-bittorrent/s4u-peer.cpp
43                       app-bittorrent/s4u-tracker.cpp)
44 target_link_libraries(s4u-bittorrent simgrid)
45 set_target_properties(s4u-bittorrent PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/app-bittorrent)
46 foreach (file s4u-bittorrent s4u-peer s4u-tracker)
47   set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/${file}.cpp
48                                      ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/${file}.hpp)
49 endforeach()
50
51 set(examples_src  ${examples_src}                                                                          PARENT_SCOPE)
52 set(tesh_files    ${tesh_files}   ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/s4u-app-bittorrent.tesh
53                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/s4u-dht-chord.tesh
54                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/s4u-dht-kademlia.tesh
55                                   ${CMAKE_CURRENT_SOURCE_DIR}/actor-lifetime/s4u-actor-lifetime.tesh
56                                   ${CMAKE_CURRENT_SOURCE_DIR}/actor-yield/s4u-actor-yield.tesh
57                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/s4u-async-wait.tesh
58                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-waitany/s4u-async-waitany.tesh
59                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-waitall/s4u-async-waitall.tesh
60                                   ${CMAKE_CURRENT_SOURCE_DIR}/exec-basic/s4u-exec-basic.tesh
61                                   ${CMAKE_CURRENT_SOURCE_DIR}/exec-dvfs/s4u-exec-dvfs.tesh
62                   PARENT_SCOPE)
63 set(xml_files     ${xml_files}    ${CMAKE_CURRENT_SOURCE_DIR}/actor-create/s4u-actor-create_d.xml
64                                   ${CMAKE_CURRENT_SOURCE_DIR}/actor-lifetime/s4u-actor-lifetime_d.xml
65                                   ${CMAKE_CURRENT_SOURCE_DIR}/actor-yield/s4u-actor-yield_d.xml
66                                   ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/s4u-app-bittorrent_d.xml
67                                   ${CMAKE_CURRENT_SOURCE_DIR}/app-masterworker/s4u-app-masterworker_d.xml
68                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-waitany/s4u-async-waitany_d.xml
69                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-waitall/s4u-async-waitall_d.xml
70                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/s4u-async-wait_d.xml
71                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/s4u-dht-chord_d.xml
72                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/s4u-dht-kademlia_d.xml
73                                   ${CMAKE_CURRENT_SOURCE_DIR}/energy-boot/platform_boot.xml
74                                   ${CMAKE_CURRENT_SOURCE_DIR}/io-file-remote/s4u-io-file-remote_d.xml
75                                   ${CMAKE_CURRENT_SOURCE_DIR}/platform-properties/s4u-platform-properties_d.xml
76                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split_d.xml
77                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm_d.xml
78                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-storage/s4u-replay-storage_d.xml
79                   PARENT_SCOPE)
80 set(bin_files     ${bin_files}    ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/generate.py                     PARENT_SCOPE)
81 set(txt_files     ${txt_files}    ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split-p0.txt
82                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split-p1.txt
83                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm.txt
84                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-storage/s4u-replay-storage.txt
85                                   ${CMAKE_CURRENT_SOURCE_DIR}/README.doc                                   PARENT_SCOPE)
86
87 foreach(example actor-create actor-daemon actor-join actor-kill actor-kill-pid
88                 actor-lifetime actor-migration actor-suspend actor-yield
89                 app-bittorrent app-chainsend app-masterworker app-pingpong app-token-ring 
90                 async-wait async-waitall async-waitany
91                 cloud-capping cloud-migration cloud-simple
92                 dht-chord dht-kademlia
93                 energy-exec energy-boot energy-link energy-vm
94                 exec-async exec-basic exec-dvfs exec-monitor exec-ptask exec-remote
95                 platform-properties plugin-hostload mutex
96                 io-file-system io-file-remote io-storage-raw
97                 replay-comm replay-storage)
98   ADD_TESH_FACTORIES(s4u-${example} "thread;ucontext;raw;boost" 
99                                     --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/${example} 
100                                     --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms 
101                                     --cd ${CMAKE_CURRENT_SOURCE_DIR}/${example} 
102                                     ${CMAKE_HOME_DIRECTORY}/examples/s4u/${example}/s4u-${example}.tesh)
103 endforeach()
104
105 foreach (example trace-platform)
106   ADD_TESH(s4u-${example} --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/${example}
107                           --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms 
108                           ${CMAKE_HOME_DIRECTORY}/examples/s4u/${example}/s4u-${example}.tesh)
109 endforeach()