Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
ignore a directory generated by sphinx
[simgrid.git] / examples / s4u / CMakeLists.txt
1 # THIS IS ONLY FOR THE FILES. To add your test (tesh) as well, make sure you add
2 # the same at the bottom of the file as well.
3 foreach (example actor-create actor-daemon actor-join actor-kill
4                  actor-lifetime actor-migration actor-suspend actor-yield
5                  app-chainsend app-pingpong app-token-ring
6                  async-ready async-wait async-waitany async-waitall async-waituntil
7                  cloud-capping cloud-migration cloud-simple
8                  energy-exec energy-boot energy-link energy-vm
9                  engine-filtering
10                  exec-async exec-basic exec-dvfs exec-monitor exec-ptask exec-remote
11                  io-async io-file-system io-file-remote io-storage-raw
12                  mutex
13                  platform-failures platform-properties plugin-hostload 
14                  replay-comm replay-storage
15                  routing-get-clusters
16                  trace-platform)
17   add_executable       (s4u-${example}  ${example}/s4u-${example}.cpp)
18   target_link_libraries(s4u-${example}  simgrid)
19   set_target_properties(s4u-${example}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${example})
20
21   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${example}/s4u-${example}.tesh)
22   set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/${example}/s4u-${example}.cpp)
23 endforeach()
24
25 # MASTERWORKERS EXAMPLE
26 foreach(variant fun class) 
27   add_executable       (s4u-app-masterworkers-${variant}  app-masterworkers/s4u-app-masterworkers-${variant}.cpp)
28   target_link_libraries(s4u-app-masterworkers-${variant}  simgrid)
29   set_target_properties(s4u-app-masterworkers-${variant}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/app-masterworkers)
30
31   set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/app-masterworkers/s4u-app-masterworkers-${variant}.cpp)
32 endforeach()
33 set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/app-masterworkers/s4u-app-masterworkers.tesh)
34
35 # CHORD EXAMPLE
36 add_executable       (s4u-dht-chord dht-chord/s4u-dht-chord.cpp dht-chord/s4u-dht-chord-node.cpp)
37 target_link_libraries(s4u-dht-chord simgrid)
38 set_target_properties(s4u-dht-chord PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/dht-chord)
39 foreach (file s4u-dht-chord s4u-dht-chord-node)
40   set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/${file}.cpp)
41 endforeach()
42 set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/s4u-dht-chord.hpp)
43
44 # KADEMLIA EXAMPLE
45 add_executable       (s4u-dht-kademlia dht-kademlia/s4u-dht-kademlia.cpp dht-kademlia/node.cpp 
46                       dht-kademlia/routing_table.cpp dht-kademlia/answer.cpp)
47 target_link_libraries(s4u-dht-kademlia simgrid)
48 set_target_properties(s4u-dht-kademlia PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/dht-kademlia)
49 foreach (file answer routing_table node s4u-dht-kademlia)
50   set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/${file}.cpp 
51                                      ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/${file}.hpp)
52 endforeach()
53 set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/message.hpp)
54
55 # BITTORRENT EXAMPLE
56 add_executable       (s4u-bittorrent app-bittorrent/s4u-bittorrent.cpp app-bittorrent/s4u-peer.cpp
57                       app-bittorrent/s4u-tracker.cpp)
58 target_link_libraries(s4u-bittorrent simgrid)
59 set_target_properties(s4u-bittorrent PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/app-bittorrent)
60 foreach (file s4u-bittorrent s4u-peer s4u-tracker)
61   set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/${file}.cpp
62                                      ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/${file}.hpp)
63 endforeach()
64
65 set(examples_src  ${examples_src}                                                                          PARENT_SCOPE)
66 set(tesh_files    ${tesh_files}   ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/s4u-app-bittorrent.tesh
67                                   ${CMAKE_CURRENT_SOURCE_DIR}/app-pingpong/simix-breakpoint.tesh
68                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/s4u-dht-chord.tesh
69                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/s4u-dht-kademlia.tesh
70                   PARENT_SCOPE)
71 set(xml_files     ${xml_files}    ${CMAKE_CURRENT_SOURCE_DIR}/actor-create/s4u-actor-create_d.xml
72                                   ${CMAKE_CURRENT_SOURCE_DIR}/actor-lifetime/s4u-actor-lifetime_d.xml
73                                   ${CMAKE_CURRENT_SOURCE_DIR}/actor-yield/s4u-actor-yield_d.xml
74                                   ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/s4u-app-bittorrent_d.xml
75                                   ${CMAKE_CURRENT_SOURCE_DIR}/app-masterworkers/s4u-app-masterworkers_d.xml
76                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/s4u-async-wait_d.xml
77                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-waitany/s4u-async-waitany_d.xml
78                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-waitall/s4u-async-waitall_d.xml
79                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/s4u-async-wait_d.xml
80                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-ready/s4u-ready-wait_d.xml
81                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-waituntil/s4u-async-waituntil_d.xml
82                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/s4u-dht-chord_d.xml
83                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/s4u-dht-kademlia_d.xml
84                                   ${CMAKE_CURRENT_SOURCE_DIR}/energy-boot/platform_boot.xml
85                                   ${CMAKE_CURRENT_SOURCE_DIR}/io-file-remote/s4u-io-file-remote_d.xml
86                                   ${CMAKE_CURRENT_SOURCE_DIR}/platform-properties/s4u-platform-properties_d.xml
87                                   ${CMAKE_CURRENT_SOURCE_DIR}/platform-failures/s4u-masterworker-failures_d.xml
88                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split_d.xml
89                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm_d.xml
90                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-storage/s4u-replay-storage_d.xml
91                   PARENT_SCOPE)
92 set(bin_files     ${bin_files}    ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/generate.py                     PARENT_SCOPE)
93 set(txt_files     ${txt_files}    ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split-p0.txt
94                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split-p1.txt
95                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm.txt
96                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-storage/s4u-replay-storage.txt
97                                   ${CMAKE_CURRENT_SOURCE_DIR}/README.doc                                   PARENT_SCOPE)
98
99 foreach(example actor-create actor-daemon actor-join actor-kill
100                 actor-lifetime actor-migration actor-suspend actor-yield
101                 app-bittorrent app-chainsend app-masterworkers app-pingpong app-token-ring 
102                 async-ready async-wait async-waitall async-waitany async-waituntil
103                 cloud-capping cloud-migration cloud-simple
104                 dht-chord dht-kademlia
105                 energy-exec energy-boot energy-link energy-vm
106                 engine-filtering
107                 exec-async exec-basic exec-dvfs exec-monitor exec-ptask exec-remote
108                 platform-properties plugin-hostload mutex # FIXME: platform-failures is disabled
109                 io-async io-file-system io-file-remote io-storage-raw
110                 replay-comm replay-storage
111                 routing-get-clusters
112                 )
113   ADD_TESH_FACTORIES(s4u-${example} "thread;ucontext;raw;boost" 
114                                     --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/${example} 
115                                     --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms 
116                                     --cd ${CMAKE_CURRENT_SOURCE_DIR}/${example} 
117                                     ${CMAKE_HOME_DIRECTORY}/examples/s4u/${example}/s4u-${example}.tesh)
118 endforeach()
119
120 foreach (example trace-platform)
121   ADD_TESH(s4u-${example} --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/${example}
122                           --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms 
123                           ${CMAKE_HOME_DIRECTORY}/examples/s4u/${example}/s4u-${example}.tesh)
124 endforeach()
125
126 if (NOT enable_memcheck AND NOT WIN32)
127   ADD_TESH(simix-breakpoint --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/app-pingpong
128                             --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
129                             ${CMAKE_CURRENT_SOURCE_DIR}/app-pingpong/simix-breakpoint.tesh)
130 endif()