Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
0e62567023549f56ff82f5173ceea2ab19fe0921
[simgrid.git] / examples / deprecated / msg / CMakeLists.txt
1 # C examples
2 foreach(x app-masterworker cloud-masterworker
3           dht-pastry energy-vm platform-failures 
4           process-create 
5           synchro-semaphore trace-categories 
6           trace-route-user-variables trace-link-user-variables trace-masterworker
7           trace-process-migration trace-host-user-variables)
8   add_executable       (${x}  EXCLUDE_FROM_ALL ${x}/${x}.c)
9   target_link_libraries(${x}  simgrid)
10   set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
11   add_dependencies(tests ${x})
12   set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
13   set(tesh_files   ${tesh_files}   ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
14 endforeach()
15
16 if(SIMGRID_HAVE_NS3)
17   add_executable       (network-ns3 EXCLUDE_FROM_ALL network-ns3/network-ns3.c)
18   target_link_libraries(network-ns3 simgrid)
19   set_target_properties(network-ns3  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/network-ns3)
20   add_dependencies(tests network-ns3)    
21 endif()
22
23 add_executable       (dht-kademlia EXCLUDE_FROM_ALL dht-kademlia/dht-kademlia.c dht-kademlia/node.c dht-kademlia/routing_table.c dht-kademlia/task.c dht-kademlia/answer.c)
24 target_link_libraries(dht-kademlia simgrid)
25 set_target_properties(dht-kademlia PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/dht-kademlia)
26 add_dependencies(tests dht-kademlia)
27 foreach (file answer dht-kademlia node routing_table task)
28   set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/${file}.c  ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/${file}.h)
29 endforeach()
30
31 foreach (file app-masterworker dht-kademlia dht-pastry)
32   set(xml_files    ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/${file}/${file}_d.xml)
33 endforeach()
34
35 set(txt_files    ${txt_files}     ${CMAKE_CURRENT_SOURCE_DIR}/README.doc          PARENT_SCOPE)
36 set(bin_files    ${bin_files}     ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/generate.py
37                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-pastry/generate.py                       PARENT_SCOPE)
38 set(examples_src ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/common.h
39                                   ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/network-ns3.c                    PARENT_SCOPE)
40 set(tesh_files   ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/dht-kademlia.tesh
41                                   ${CMAKE_CURRENT_SOURCE_DIR}/app-masterworker/app-masterworker-multicore.tesh
42                                   ${CMAKE_CURRENT_SOURCE_DIR}/app-masterworker/app-masterworker-vivaldi.tesh
43                                   ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/network-ns3.tesh                 PARENT_SCOPE)
44 set(xml_files    ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/app-masterworker/app-masterworker-multicore_d.xml
45                                   ${CMAKE_CURRENT_SOURCE_DIR}/app-masterworker/app-masterworker-vivaldi_d.xml
46                                   ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/3hosts_2links_d.xml
47                                   ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/3links-timer_d.xml
48                                   ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/3links_d.xml
49                                   ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/crosstraffic_d.xml
50                                   ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/dogbone_d.xml
51                                   ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/onelink_d.xml
52                                   ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/one_cluster_d.xml        PARENT_SCOPE)
53
54 foreach(x app-masterworker cloud-masterworker
55           dht-pastry dht-kademlia platform-failures
56           energy-vm
57           process-create 
58           synchro-semaphore)
59   ADD_TESH_FACTORIES(msg-${x} "thread;ucontext;raw;boost" 
60                               --setenv bindir=${CMAKE_BINARY_DIR}/examples/deprecated/msg/${x}
61                               --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/deprecated/msg/${x} 
62                               --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms 
63                               ${CMAKE_HOME_DIRECTORY}/examples/deprecated/msg/${x}/${x}.tesh)
64 endforeach()
65
66 foreach (x trace-categories trace-route-user-variables trace-link-user-variables trace-masterworker trace-process-migration trace-host-user-variables)
67   ADD_TESH(msg-${x} --setenv bindir=${CMAKE_BINARY_DIR}/examples/deprecated/msg/${x}
68                     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/deprecated/msg/${x} 
69                     --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms 
70                     --cd ${CMAKE_BINARY_DIR}/examples/deprecated/msg/${x}
71                     ${CMAKE_HOME_DIRECTORY}/examples/deprecated/msg/${x}/${x}.tesh)
72 endforeach()
73
74 ADD_TESH_FACTORIES(msg-dht-kademlia-parallel "thread;ucontext;raw;boost" --cfg contexts/nthreads:4 ${CONTEXTS_SYNCHRO} 
75                                              --setenv bindir=${CMAKE_BINARY_DIR}/examples/deprecated/msg/dht-kademlia
76                                              --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/deprecated/msg/dht-kademlia
77                                              --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
78                                              ${CMAKE_HOME_DIRECTORY}/examples/deprecated/msg/dht-kademlia/dht-kademlia.tesh)
79
80 ADD_TESH_FACTORIES(app-masterworker-multicore   "thread;ucontext;raw;boost" 
81                                                 --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/deprecated/msg/app-masterworker 
82                                                 --setenv bindir=${CMAKE_BINARY_DIR}/examples/deprecated/msg/app-masterworker
83                                                 --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
84                                                 ${CMAKE_HOME_DIRECTORY}/examples/deprecated/msg/app-masterworker/app-masterworker-multicore.tesh)
85 ADD_TESH_FACTORIES(app-masterworker-vivaldi     "thread;ucontext;raw;boost" 
86                                                 --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/deprecated/msg/app-masterworker 
87                                                 --setenv bindir=${CMAKE_BINARY_DIR}/examples/deprecated/msg/app-masterworker
88                                                 --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
89                                                 ${CMAKE_HOME_DIRECTORY}/examples/deprecated/msg/app-masterworker/app-masterworker-vivaldi.tesh)
90
91 if(SIMGRID_HAVE_NS3)
92   ADD_TESH_FACTORIES(msg-network-ns3 "thread;ucontext;raw;boost"
93                                       --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/deprecated/msg
94                                       --setenv bindir=${CMAKE_BINARY_DIR}/examples/deprecated/msg
95                                       --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
96                                       ${CMAKE_HOME_DIRECTORY}/examples/deprecated/msg/network-ns3/network-ns3.tesh)
97 endif()