Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
convert cloud-migration example
[simgrid.git] / teshsuite / msg / CMakeLists.txt
1 # C examples
2 foreach(x actions-comm actions-storage
3           app-pingpong app-token-ring
4           async-wait async-waitall async-waitany
5           cloud-capping cloud-migration cloud-sharing cloud-two-tasks cloud-simple
6           get_sender host_on_off host_on_off_recv host_on_off_processes   
7           process-daemon process-kill process-join process-lifetime process-migration process-suspend process-yield
8           energy-consumption energy-ptask energy-pstate platform-properties
9           io-file io-raw-storage io-file-remote
10           task-priority
11           plugin-hostload
12           trace_integration)
13   add_executable       (${x}  ${x}/${x}.c)
14   target_link_libraries(${x}  simgrid)
15   set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
16
17   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
18   set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
19 endforeach()
20
21 # CPP examples
22 foreach(x task_destroy_cancel task_listen_from task_progress)
23   add_executable       (${x}  ${x}/${x}.cpp)
24   target_link_libraries(${x}  simgrid)
25   set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
26
27   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
28   set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.cpp)
29 endforeach()
30
31 add_executable       (bittorrent app-bittorrent/bittorrent.c app-bittorrent/messages.c app-bittorrent/peer.c app-bittorrent/tracker.c app-bittorrent/connection.c)
32 target_link_libraries(bittorrent simgrid)
33 set_target_properties(bittorrent PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/app-bittorrent)
34 foreach (file bittorrent connection messages peer tracker)
35   set(teshsuite_src  ${teshsuite_src}  ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/${file}.c  ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/${file}.h)
36 endforeach()
37
38 add_executable       (chainsend app-chainsend/chainsend.c app-chainsend/iterator.c app-chainsend/common.c app-chainsend/messages.c app-chainsend/broadcaster.c app-chainsend/peer.c)
39 target_link_libraries(chainsend simgrid)
40 set_target_properties(chainsend PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/app-chainsend)
41 foreach (file common iterator messages broadcaster peer)
42   set(teshsuite_src  ${teshsuite_src}  ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/${file}.c  ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/${file}.h)
43 endforeach()
44 set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/chainsend.c)
45                                   
46 set(teshsuite_src ${teshsuite_src}  PARENT_SCOPE)
47 set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/app-bittorrent.tesh          
48                                    ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/app-chainsend.tesh
49                                    PARENT_SCOPE)
50 set(bin_files    ${bin_files}      ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/generate.py                  PARENT_SCOPE)
51 set(txt_files     ${txt_files}     ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/actions-comm.txt
52                                    ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/actions-comm_split_p0.txt
53                                    ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/actions-comm_split_p1.txt
54                                    ${CMAKE_CURRENT_SOURCE_DIR}/actions-storage/actions-storage.txt         PARENT_SCOPE)
55 set(xml_files     ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/actions-comm_d.xml
56                                    ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/actions-comm_split_d.xml
57                                    ${CMAKE_CURRENT_SOURCE_DIR}/actions-storage/actions-storage_d.xml
58                                    ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/app-bittorrent_d.xml
59                                    ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/app-chainsend_d.xml
60                                    ${CMAKE_CURRENT_SOURCE_DIR}/app-pingpong/app-pingpong_d.xml
61                                    ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/async-wait_d.xml
62                                    ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/async-wait2_d.xml
63                                    ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/async-wait3_d.xml
64                                    ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/async-wait4_d.xml
65                                    ${CMAKE_CURRENT_SOURCE_DIR}/async-waitall/async-waitall_d.xml
66                                    ${CMAKE_CURRENT_SOURCE_DIR}/async-waitany/async-waitany_d.xml
67                                    ${CMAKE_CURRENT_SOURCE_DIR}/io-file-remote/io-file-remote_d.xml
68                                    ${CMAKE_CURRENT_SOURCE_DIR}/platform-properties/platform-properties_d.xml
69                                    ${CMAKE_CURRENT_SOURCE_DIR}/process-lifetime/baseline_d.xml
70                                    ${CMAKE_CURRENT_SOURCE_DIR}/process-lifetime/kill_d.xml
71                                    ${CMAKE_CURRENT_SOURCE_DIR}/process-lifetime/start_d.xml
72                                    ${CMAKE_CURRENT_SOURCE_DIR}/process-lifetime/start_kill_d.xml
73                                    ${CMAKE_CURRENT_SOURCE_DIR}/process-yield/process-yield_d.xml
74                                    ${CMAKE_CURRENT_SOURCE_DIR}/task-priority/task-priority_d.xml
75                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1.0-hbp1.0-hbp1.0.xml
76                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1.0-hbp3.0-hbp4.0.xml
77                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1.5-hbp1.5.xml
78                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1-c0s0-c0s1.xml
79                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1-c0s0-c1s0.xml
80                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1-c0s1-c0s2.xml
81                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1-c0s1-c2s2.xml
82                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1-c0s2-c1s0.xml
83                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1-c0s2-c1s1.xml
84                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1-c1s1-c1s2.xml
85                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1-c1s1-c3s2.xml
86                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp2.5-hbp1.5.xml    PARENT_SCOPE)
87
88 foreach(x 
89     actions-comm actions-storage
90     async-wait async-waitall async-waitany
91     app-bittorrent app-chainsend app-pingpong app-token-ring
92     cloud-capping cloud-migration cloud-two-tasks cloud-simple
93     energy-pstate
94     host_on_off host_on_off_processes host_on_off_recv
95     get_sender
96     task_destroy_cancel task_listen_from task_progress 
97     process-daemon process-kill process-join process-lifetime process-migration process-suspend process-yield
98     energy-consumption energy-ptask
99     io-file io-raw-storage io-file-remote
100     platform-properties
101     plugin-hostload
102     trace_integration)
103   ADD_TESH_FACTORIES(tesh-msg-${x} "thread;ucontext;raw;boost" 
104                                    --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
105                                    --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/msg/${x}
106                                    --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x} 
107                                    ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x}/${x}.tesh)
108 endforeach()
109
110 foreach(x cloud-sharing)
111   ADD_TESH(tesh-msg-${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x} --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/${x} ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x}/${x}.tesh)
112 endforeach()
113
114 ADD_TESH_FACTORIES(tesh-app-bittorrent-parallel         "thread;ucontext;raw;boost" --cfg contexts/nthreads:4 ${CONTEXTS_SYNCHRO} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/msg/app-bittorrent --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/app-bittorrent app-bittorrent.tesh)