Logo AND Algorithmique Numérique Distribuée

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