Logo AND Algorithmique Numérique Distribuée

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