Logo AND Algorithmique Numérique Distribuée

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