Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
start to rename cloud examples
[simgrid.git] / examples / msg / CMakeLists.txt
1 foreach(x actions-mpi actions-storage async-wait async-waitall async-waitany 
2           cloud-capping cloud-masterworker cloud-migration cloud-multicore dht-chord dht-pastry exception 
3           energy-consumption energy-onoff energy-pstate energy-ptask energy-vm failures io-file io-file-unlink io-remote
4           io-storage masterworker masterworker-mailbox pmm task-priority process-kill process-migration process-suspend 
5           properties sendrecv set-maestro process-startkilltime synchro token_ring trace-categories 
6           trace-link-srcdst-user-variables trace-link-user-variables trace-masterworker trace-platform 
7           trace-process-migration trace-simple trace-user-variables)
8   add_executable       (${x}     ${x}/${x}.c)
9   target_link_libraries(${x}     simgrid)
10   set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
11   set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
12   set(tesh_files   ${tesh_files}   ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
13 endforeach()
14
15 if(HAVE_NS3)
16   add_executable       (ns3 ns3/ns3.c)
17   target_link_libraries(ns3 simgrid)
18   set_target_properties(ns3  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ns3)
19 endif()
20
21 add_executable       (bittorrent bittorrent/bittorrent.c bittorrent/messages.c bittorrent/peer.c bittorrent/tracker.c bittorrent/connection.c)
22 target_link_libraries(bittorrent simgrid)
23 set_target_properties(bittorrent PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bittorrent)
24 foreach (file bittorrent connection messages peer tracker)
25   set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/bittorrent/${file}.c  ${CMAKE_CURRENT_SOURCE_DIR}/bittorrent/${file}.h)
26 endforeach()
27
28 add_executable       (chainsend chainsend/chainsend.c chainsend/iterator.c chainsend/common.c chainsend/messages.c chainsend/broadcaster.c chainsend/peer.c)
29 target_link_libraries(chainsend simgrid)
30 set_target_properties(chainsend PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/chainsend)
31 foreach (file common iterator messages broadcaster peer)
32   set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/chainsend/${file}.c  ${CMAKE_CURRENT_SOURCE_DIR}/chainsend/${file}.h)
33 endforeach()
34
35 add_executable       (dht-kademlia dht-kademlia/dht-kademlia.c dht-kademlia/node.c dht-kademlia/routing_table.c dht-kademlia/task.c dht-kademlia/answer.c)
36 target_link_libraries(dht-kademlia simgrid)
37 set_target_properties(dht-kademlia PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/dht-kademlia)
38 foreach (file answer dht-kademlia node routing_table task)
39   set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/${file}.c  ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/${file}.h)
40 endforeach()
41
42 foreach (file actions-mpi actions-storage async-wait async-waitall async-waitany bittorrent chainsend dht-chord 
43          dht-kademlia dht-pastry io-remote masterworker masterworker-mailbox properties sendrecv set-maestro
44          task-priority)
45   set(xml_files    ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/${file}/${file}_d.xml)
46 endforeach()
47
48 set(txt_files    ${txt_files}     ${CMAKE_CURRENT_SOURCE_DIR}/README
49                                   ${CMAKE_CURRENT_SOURCE_DIR}/actions-mpi/actions-mpi.txt
50                                   ${CMAKE_CURRENT_SOURCE_DIR}/actions-mpi/actions-mpi_split_p0.txt
51                                   ${CMAKE_CURRENT_SOURCE_DIR}/actions-mpi/actions-mpi_split_p1.txt
52                                   ${CMAKE_CURRENT_SOURCE_DIR}/actions-storage/actions-storage.txt          PARENT_SCOPE)
53 set(bin_files    ${bin_files}     ${CMAKE_CURRENT_SOURCE_DIR}/bittorrent/generate.py
54                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/generate.py
55                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/generate.py                     PARENT_SCOPE)
56 set(examples_src ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/chainsend/chainsend.c
57                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/common.h
58                                   ${CMAKE_CURRENT_SOURCE_DIR}/ns3/ns3.c                                    PARENT_SCOPE)
59 set(tesh_files   ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/bittorrent/bittorrent.tesh
60                                   ${CMAKE_CURRENT_SOURCE_DIR}/chainsend/chainsend.tesh
61                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/dht-kademlia.tesh
62                                   ${CMAKE_CURRENT_SOURCE_DIR}/masterworker/masterworker_cpu_ti.tesh
63                                   ${CMAKE_CURRENT_SOURCE_DIR}/masterworker-mailbox/masterworker-mailbox-multicore.tesh
64                                   ${CMAKE_CURRENT_SOURCE_DIR}/masterworker-mailbox/masterworker-mailbox-vivaldi.tesh
65                                   ${CMAKE_CURRENT_SOURCE_DIR}/ns3/ns3.tesh                                 PARENT_SCOPE)
66 set(xml_files    ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/actions-mpi/actions-mpi_split_d.xml
67                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/async-wait2_d.xml
68                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/async-wait3_d.xml
69                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/async-wait4_d.xml
70                                   ${CMAKE_CURRENT_SOURCE_DIR}/energy-onoff/platform_onoff.xml
71                                   ${CMAKE_CURRENT_SOURCE_DIR}/masterworker-mailbox/masterworker-mailbox-multicore_d.xml
72                                   ${CMAKE_CURRENT_SOURCE_DIR}/masterworker-mailbox/masterworker-mailbox-vivaldi_d.xml
73                                   ${CMAKE_CURRENT_SOURCE_DIR}/ns3/3hosts_2links_d.xml
74                                   ${CMAKE_CURRENT_SOURCE_DIR}/ns3/3links-timer_d.xml
75                                   ${CMAKE_CURRENT_SOURCE_DIR}/ns3/3links_d.xml
76                                   ${CMAKE_CURRENT_SOURCE_DIR}/ns3/crosstraffic_d.xml
77                                   ${CMAKE_CURRENT_SOURCE_DIR}/ns3/dogbone_d.xml
78                                   ${CMAKE_CURRENT_SOURCE_DIR}/ns3/onelink_d.xml
79                                   ${CMAKE_CURRENT_SOURCE_DIR}/ns3/one_cluster_d.xml
80                                   ${CMAKE_CURRENT_SOURCE_DIR}/ns3/two_clusters_d.xml
81                                   ${CMAKE_CURRENT_SOURCE_DIR}/process-startkilltime/baseline_d.xml
82                                   ${CMAKE_CURRENT_SOURCE_DIR}/process-startkilltime/kill_d.xml
83                                   ${CMAKE_CURRENT_SOURCE_DIR}/process-startkilltime/start_d.xml
84                                   ${CMAKE_CURRENT_SOURCE_DIR}/process-startkilltime/start_kill_d.xml       PARENT_SCOPE)
85
86 foreach(x actions-mpi actions-storage async-wait async-waitall async-waitany bittorrent chainsend 
87         cloud-capping cloud-masterworker cloud-migration dht-chord dht-kademlia
88         failures io-file io-file-unlink io-remote io-storage masterworker masterworker-mailbox task-priority process-kill 
89         process-migration process-suspend properties sendrecv synchro process-startkilltime token_ring)
90   ADD_TESH_FACTORIES(msg-${x} "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/${x} ${x}.tesh)
91 endforeach()
92
93 foreach (example consumption onoff pstate vm)
94   ADD_TESH_FACTORIES(msg-energy-${example} "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/energy-${example}/energy-${example}.tesh)
95 endforeach()
96
97 foreach (x categories link-srcdst-user-variables link-user-variables masterworker platform process-migration simple user-variables)
98   ADD_TESH(msg-trace-${x} --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/trace-${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/trace-${x} trace-${x}.tesh)
99 endforeach()
100
101 ADD_TESH_FACTORIES(msg-bittorrent-parallel             "thread;ucontext;raw" --cfg contexts/nthreads:4 ${CONTEXTS_SYNCHRO} --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/bittorrent --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/bittorrent bittorrent.tesh)
102 ADD_TESH_FACTORIES(msg-dht-chord-parallel              "thread;ucontext;raw" --cfg contexts/nthreads:4 ${CONTEXTS_SYNCHRO} --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/dht-chord --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/dht-chord dht-chord.tesh)
103 ADD_TESH_FACTORIES(msg-dht-kademlia-parallel           "thread;ucontext;raw" --cfg contexts/nthreads:4 ${CONTEXTS_SYNCHRO} --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/dht-kademlia --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/dht-kademlia dht-kademlia.tesh)
104 ADD_TESH_FACTORIES(msg-energy-pstate-ptask             "thread;ucontext;raw;boost" --cfg host/model:ptask_L07 --log xbt_cfg.threshold:critical --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/energy-pstate/energy-pstate.tesh)
105 ADD_TESH_FACTORIES(msg-energy-consumption-ptask        "thread;ucontext;raw;boost" --cfg host/model:ptask_L07 --log xbt_cfg.threshold:critical --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/energy-consumption/energy-consumption.tesh)
106 ADD_TESH_FACTORIES(msg-energy-ptask                    "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/energy-ptask/energy-ptask.tesh)
107 ADD_TESH_FACTORIES(msg-set-maestro                     "thread" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/set-maestro/set-maestro.tesh)
108
109 ADD_TESH_FACTORIES(msg-masterworker-mailbox-multicore   "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterworker-mailbox/masterworker-mailbox-multicore.tesh)
110 ADD_TESH_FACTORIES(msg-masterworker-mailbox-vivaldi     "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterworker-mailbox/masterworker-mailbox-vivaldi.tesh)
111
112 # Weird issue with this one ...
113 #ADD_TESH_FACTORIES(msg-masterworker-cpu-ti              "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/masterworker --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/masterworker masterworker_cpu_ti.tesh)
114
115 ADD_TESH(msg-pmm  --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/pmm/pmm.tesh)
116
117 if(HAVE_NS3)
118   ADD_TESH_FACTORIES(msg-ns3 "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY} --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/ns3.tesh)
119 endif()
120
121 # These one are not usable:
122 # ADD_TESH_FACTORIES(msg-exception "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/exception/exception.tesh)
123 # ADD_TESH_FACTORIES(msg-dht-pastry                    "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg/dht-pastry --cd ${CMAKE_BINARY_DIR}/examples/msg/dht-pastry dht-pastry.tesh)