Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
convert trace-integration test
[simgrid.git] / teshsuite / msg / CMakeLists.txt
1 # C examples
2 foreach(x cloud-two-tasks
3           get_sender
4           platform-properties
5           io-file)
6   if(enable_msg)
7     add_executable       (${x} EXCLUDE_FROM_ALL ${x}/${x}.c)
8     target_link_libraries(${x} simgrid)
9     set_target_properties(${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
10     add_dependencies(tests ${x})
11   endif()
12
13   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
14   set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
15 endforeach()
16
17 # CPP examples
18 foreach(x task_destroy_cancel task_listen_from task_progress host_on_off_processes)
19   if(enable_msg)
20     add_executable       (${x}  EXCLUDE_FROM_ALL ${x}/${x}.cpp)
21     target_link_libraries(${x}  simgrid)
22     set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
23     add_dependencies(tests ${x})
24   endif()
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 if(enable_msg)
31   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)
32   target_link_libraries(bittorrent simgrid)
33   set_target_properties(bittorrent PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/app-bittorrent)
34   add_dependencies(tests bittorrent)
35 endif()
36 foreach (file bittorrent connection bittorrent-messages bittorrent-peer tracker)
37   set(teshsuite_src  ${teshsuite_src}  ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/${file}.c  ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/${file}.h)
38 endforeach()
39
40 set(teshsuite_src ${teshsuite_src}  PARENT_SCOPE)
41 set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/app-bittorrent.tesh          
42                                    PARENT_SCOPE)
43 set(bin_files    ${bin_files}      ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/generate.py                  PARENT_SCOPE)
44 set(xml_files     ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/app-bittorrent_d.xml
45                                    ${CMAKE_CURRENT_SOURCE_DIR}/platform-properties/platform-properties_d.xml
46                                    PARENT_SCOPE)
47
48 if(enable_msg)
49   foreach(x 
50     app-bittorrent
51     cloud-two-tasks
52     host_on_off_processes
53     get_sender
54     task_destroy_cancel task_listen_from task_progress 
55     io-file
56     platform-properties)
57     
58     ADD_TESH_FACTORIES(tesh-msg-${x} "raw" 
59                                      --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
60                                      --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/msg/${x}
61                                      --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x} 
62                                      ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x}/${x}.tesh)
63   endforeach()
64
65
66   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)
67 endif()