Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove test
[simgrid.git] / teshsuite / msg / CMakeLists.txt
1 # C examples
2 foreach(x cloud-two-tasks get_sender platform-properties io-file task_listen_from task_destroy_cancel)
3   if(enable_msg)
4     add_executable       (${x} EXCLUDE_FROM_ALL ${x}/${x}.c)
5     target_link_libraries(${x} simgrid)
6     set_target_properties(${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
7     add_dependencies(tests ${x})
8   endif()
9
10   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
11   set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
12 endforeach()
13
14 # CPP examples
15 foreach(x host_on_off_processes)
16   if(enable_msg)
17     add_executable       (${x}  EXCLUDE_FROM_ALL ${x}/${x}.cpp)
18     target_link_libraries(${x}  simgrid)
19     set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
20     add_dependencies(tests ${x})
21   endif()
22
23   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
24   set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.cpp)
25 endforeach()
26
27 if(enable_msg)
28   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)
29   target_link_libraries(bittorrent simgrid)
30   set_target_properties(bittorrent PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/app-bittorrent)
31   add_dependencies(tests bittorrent)
32 endif()
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 set(teshsuite_src ${teshsuite_src}  PARENT_SCOPE)
38 set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/app-bittorrent.tesh          PARENT_SCOPE)
39 set(bin_files     ${bin_files}     ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/generate.py                  PARENT_SCOPE)
40 set(xml_files     ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/app-bittorrent_d.xml
41                                    ${CMAKE_CURRENT_SOURCE_DIR}/platform-properties/platform-properties_d.xml
42                                    PARENT_SCOPE)
43
44 if(enable_msg)
45   foreach(x app-bittorrent cloud-two-tasks host_on_off_processes get_sender task_destroy_cancel task_listen_from
46           io-file platform-properties)
47
48     ADD_TESH_FACTORIES(tesh-msg-${x} "raw"  --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
49                                             --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/msg/${x}
50                                             --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x} 
51                                             ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x}/${x}.tesh)
52   endforeach()
53
54   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)
55 endif()