Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add test() for asynchronous executions
[simgrid.git] / examples / s4u / CMakeLists.txt
1 foreach (example actor-create actor-daemon actor-join actor-kill actor-lifetime actor-migration actor-suspend actor-yield
2                  app-masterworker app-pingpong app-token-ring
3                  async-wait async-waitany async-waitall
4                  energy-link energy-pstate energy-ptask energy-vm
5                  exec-async exec-basic exec-monitor exec-remote
6                  io-file-system io-file-remote io-storage-raw
7                  mutex
8                  platform-properties plugin-hostload 
9                  replay-comm replay-storage)
10   add_executable       (s4u-${example}  ${example}/s4u-${example}.cpp)
11   target_link_libraries(s4u-${example}  simgrid)
12   set_target_properties(s4u-${example}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${example})
13
14   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${example}/s4u-${example}.tesh)
15   set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/${example}/s4u-${example}.cpp)
16 endforeach()
17
18 # CHORD EXAMPLE
19 add_executable       (s4u-dht-chord dht-chord/s4u-dht-chord.cpp dht-chord/node.cpp)
20 target_link_libraries(s4u-dht-chord simgrid)
21 set_target_properties(s4u-dht-chord PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/dht-chord)
22 foreach (file s4u-dht-chord node)
23   set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/${file}.cpp)
24 endforeach()
25 set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/s4u-dht-chord.hpp)
26
27 add_executable       (s4u-bittorrent app-bittorrent/s4u-bittorrent.cpp app-bittorrent/s4u-peer.cpp
28                       app-bittorrent/s4u-tracker.cpp)
29 target_link_libraries(s4u-bittorrent simgrid)
30 set_target_properties(s4u-bittorrent PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/app-bittorrent)
31 foreach (file s4u-bittorrent s4u-peer s4u-tracker)
32   set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/${file}.cpp
33                                      ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/${file}.hpp)
34 endforeach()
35
36 set(examples_src  ${examples_src}                                                                          PARENT_SCOPE)
37 set(tesh_files    ${tesh_files}   ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/s4u-app-bittorrent.tesh
38                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/s4u-dht-chord.tesh
39                                   ${CMAKE_CURRENT_SOURCE_DIR}/energy-pstate/s4u-energy-pstate.tesh
40                                   ${CMAKE_CURRENT_SOURCE_DIR}/actor-lifetime/s4u-actor-lifetime.tesh
41                                   ${CMAKE_CURRENT_SOURCE_DIR}/actor-yield/s4u-actor-yield.tesh
42                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/s4u-async-wait.tesh
43                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-waitany/s4u-async-waitany.tesh
44                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-waitall/s4u-async-waitall.tesh
45                                   ${CMAKE_CURRENT_SOURCE_DIR}/exec-basic/s4u-exec-basic.tesh
46                   PARENT_SCOPE)
47 set(xml_files     ${xml_files}    ${CMAKE_CURRENT_SOURCE_DIR}/actor-create/s4u-actor-create_d.xml
48                                   ${CMAKE_CURRENT_SOURCE_DIR}/actor-lifetime/s4u-actor-lifetime_d.xml
49                                   ${CMAKE_CURRENT_SOURCE_DIR}/actor-yield/s4u-actor-yield_d.xml
50                                   ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/s4u-app-bittorrent_d.xml
51                                   ${CMAKE_CURRENT_SOURCE_DIR}/app-masterworker/s4u-app-masterworker_d.xml
52                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-waitany/s4u-async-waitany_d.xml
53                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-waitall/s4u-async-waitall_d.xml
54                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/s4u-async-wait_d.xml
55                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/s4u-dht-chord_d.xml
56                                   ${CMAKE_CURRENT_SOURCE_DIR}/io-file-remote/s4u-io-file-remote_d.xml
57                                   ${CMAKE_CURRENT_SOURCE_DIR}/platform-properties/s4u-platform-properties_d.xml
58                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split_d.xml
59                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm_d.xml
60                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-storage/s4u-replay-storage_d.xml
61                   PARENT_SCOPE)
62 set(txt_files     ${txt_files}    ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split-p0.txt
63                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split-p1.txt
64                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm.txt
65                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-storage/s4u-replay-storage.txt
66                                   ${CMAKE_CURRENT_SOURCE_DIR}/README.doc                                   PARENT_SCOPE)
67
68 foreach(example actor-create actor-daemon actor-join actor-kill actor-lifetime actor-migration actor-suspend actor-yield
69                 app-bittorrent app-masterworker app-pingpong app-token-ring 
70                 async-wait async-waitall async-waitany
71                 dht-chord 
72                 energy-link energy-pstate energy-ptask energy-vm
73                 exec-async exec-basic exec-monitor exec-remote
74                 platform-properties plugin-hostload mutex
75                 io-file-system io-file-remote io-storage-raw
76                 replay-comm replay-storage)
77   ADD_TESH_FACTORIES(s4u-${example} "thread;ucontext;raw;boost" 
78                                     --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/${example} 
79                                     --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms 
80                                     --cd ${CMAKE_CURRENT_SOURCE_DIR}/${example} 
81                                     ${CMAKE_HOME_DIRECTORY}/examples/s4u/${example}/s4u-${example}.tesh)
82 endforeach()