Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'cmake-no-doc-when-disabled' into 'master'
[simgrid.git] / teshsuite / msg / CMakeLists.txt
1 # C examples
2 foreach(x cloud-two-tasks
3           get_sender
4           process-lifetime
5           platform-properties
6           io-file
7           task-priority
8           trace_integration)
9   if(enable_msg)
10     add_executable       (${x} EXCLUDE_FROM_ALL ${x}/${x}.c)
11     target_link_libraries(${x} simgrid)
12     set_target_properties(${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
13     add_dependencies(tests ${x})
14   endif()
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   if(enable_msg)
23     add_executable       (${x}  EXCLUDE_FROM_ALL ${x}/${x}.cpp)
24     target_link_libraries(${x}  simgrid)
25     set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
26     add_dependencies(tests ${x})
27   endif()
28
29   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
30   set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.cpp)
31 endforeach()
32
33 if(enable_msg)
34   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)
35   target_link_libraries(bittorrent simgrid)
36   set_target_properties(bittorrent PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/app-bittorrent)
37   add_dependencies(tests bittorrent)
38 endif()
39 foreach (file bittorrent connection bittorrent-messages bittorrent-peer tracker)
40   set(teshsuite_src  ${teshsuite_src}  ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/${file}.c  ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/${file}.h)
41 endforeach()
42
43 set(teshsuite_src ${teshsuite_src}  PARENT_SCOPE)
44 set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/app-bittorrent.tesh          
45                                    PARENT_SCOPE)
46 set(bin_files    ${bin_files}      ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/generate.py                  PARENT_SCOPE)
47 set(xml_files     ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/app-bittorrent_d.xml
48                                    ${CMAKE_CURRENT_SOURCE_DIR}/platform-properties/platform-properties_d.xml
49                                    ${CMAKE_CURRENT_SOURCE_DIR}/process-lifetime/baseline_d.xml
50                                    ${CMAKE_CURRENT_SOURCE_DIR}/process-lifetime/kill_d.xml
51                                    ${CMAKE_CURRENT_SOURCE_DIR}/process-lifetime/start_d.xml
52                                    ${CMAKE_CURRENT_SOURCE_DIR}/process-lifetime/start_kill_d.xml
53                                    ${CMAKE_CURRENT_SOURCE_DIR}/task-priority/task-priority_d.xml
54                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1.0-hbp1.0-hbp1.0.xml
55                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1.0-hbp3.0-hbp4.0.xml
56                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1.5-hbp1.5.xml
57                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1-c0s0-c0s1.xml
58                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1-c0s0-c1s0.xml
59                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1-c0s1-c0s2.xml
60                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1-c0s1-c2s2.xml
61                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1-c0s2-c1s0.xml
62                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1-c0s2-c1s1.xml
63                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1-c1s1-c1s2.xml
64                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1-c1s1-c3s2.xml
65                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp2.5-hbp1.5.xml    PARENT_SCOPE)
66
67 if(enable_msg)
68   foreach(x 
69     app-bittorrent
70     cloud-two-tasks
71     host_on_off_processes
72     get_sender
73     task_destroy_cancel task_listen_from task_progress 
74     process-lifetime
75     io-file
76     platform-properties
77     task-priority
78     trace_integration)
79     
80     ADD_TESH_FACTORIES(tesh-msg-${x} "raw" 
81                                      --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
82                                      --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/msg/${x}
83                                      --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x} 
84                                      ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x}/${x}.tesh)
85   endforeach()
86
87
88   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)
89 endif()