Logo AND Algorithmique Numérique Distribuée

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