Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
convert cloud simple
[simgrid.git] / teshsuite / msg / CMakeLists.txt
1 # C examples
2 foreach(x async-wait
3           cloud-capping cloud-migration cloud-two-tasks
4           get_sender host_on_off host_on_off_recv
5           process-lifetime
6           energy-ptask energy-pstate platform-properties
7           io-file io-file-remote
8           task-priority
9           plugin-hostload
10           trace_integration)
11   if(enable_msg)
12     add_executable       (${x} EXCLUDE_FROM_ALL ${x}/${x}.c)
13     target_link_libraries(${x} simgrid)
14     set_target_properties(${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
15     add_dependencies(tests ${x})
16   endif()
17
18   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
19   set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
20 endforeach()
21
22 # CPP examples
23 foreach(x task_destroy_cancel task_listen_from task_progress host_on_off_processes)
24   if(enable_msg)
25     add_executable       (${x}  EXCLUDE_FROM_ALL ${x}/${x}.cpp)
26     target_link_libraries(${x}  simgrid)
27     set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
28     add_dependencies(tests ${x})
29   endif()
30
31   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
32   set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.cpp)
33 endforeach()
34
35 if(enable_msg)
36   add_executable       (bittorrent EXCLUDE_FROM_ALL app-bittorrent/bittorrent.c app-bittorrent/bittorrent-messages.c app-bittorrent/bittorrent-peer.c app-bittorrent/tracker.c app-bittorrent/connection.c)
37   target_link_libraries(bittorrent simgrid)
38   set_target_properties(bittorrent PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/app-bittorrent)
39   add_dependencies(tests bittorrent)
40 endif()
41 foreach (file bittorrent connection bittorrent-messages bittorrent-peer tracker)
42   set(teshsuite_src  ${teshsuite_src}  ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/${file}.c  ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/${file}.h)
43 endforeach()
44
45 if(enable_msg)
46   add_executable       (chainsend EXCLUDE_FROM_ALL app-chainsend/chainsend.c app-chainsend/iterator.c app-chainsend/common.c app-chainsend/messages.c app-chainsend/broadcaster.c app-chainsend/peer.c)
47   target_link_libraries(chainsend simgrid)
48   set_target_properties(chainsend PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/app-chainsend)
49   add_dependencies(tests chainsend)
50 endif()
51 foreach (file common iterator messages broadcaster peer)
52   set(teshsuite_src  ${teshsuite_src}  ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/${file}.c  ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/${file}.h)
53 endforeach()
54 set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/chainsend.c)
55                                   
56 set(teshsuite_src ${teshsuite_src}  PARENT_SCOPE)
57 set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/app-bittorrent.tesh          
58                                    ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/app-chainsend.tesh
59                                    PARENT_SCOPE)
60 set(bin_files    ${bin_files}      ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/generate.py                  PARENT_SCOPE)
61 set(xml_files     ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/app-bittorrent_d.xml
62                                    ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/app-chainsend_d.xml
63                                    ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/async-wait_d.xml
64                                    ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/async-wait2_d.xml
65                                    ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/async-wait3_d.xml
66                                    ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/async-wait4_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}/task-priority/task-priority_d.xml
74                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1.0-hbp1.0-hbp1.0.xml
75                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1.0-hbp3.0-hbp4.0.xml
76                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1.5-hbp1.5.xml
77                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1-c0s0-c0s1.xml
78                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1-c0s0-c1s0.xml
79                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1-c0s1-c0s2.xml
80                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1-c0s1-c2s2.xml
81                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1-c0s2-c1s0.xml
82                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1-c0s2-c1s1.xml
83                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1-c1s1-c1s2.xml
84                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1-c1s1-c3s2.xml
85                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp2.5-hbp1.5.xml    PARENT_SCOPE)
86
87 if(enable_msg)
88   foreach(x 
89     async-wait
90     app-bittorrent app-chainsend
91     cloud-capping cloud-migration cloud-two-tasks
92     energy-pstate
93     host_on_off host_on_off_processes host_on_off_recv
94     get_sender
95     task_destroy_cancel task_listen_from task_progress 
96     process-lifetime
97     energy-ptask
98     io-file io-file-remote
99     platform-properties
100     task-priority
101     plugin-hostload
102     trace_integration)
103     
104     ADD_TESH_FACTORIES(tesh-msg-${x} "raw" 
105                                      --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
106                                      --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/msg/${x}
107                                      --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x} 
108                                      ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x}/${x}.tesh)
109   endforeach()
110
111
112   ADD_TESH_FACTORIES(tesh-app-bittorrent-parallel         "raw" --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)
113 endif()