Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
convert (and simplify a bit) dht-kademlia example
[simgrid.git] / teshsuite / msg / CMakeLists.txt
1 # C examples
2 foreach(x cloud-two-tasks get_sender 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 if(enable_msg)
15   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)
16   target_link_libraries(bittorrent simgrid)
17   set_target_properties(bittorrent PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/app-bittorrent)
18   add_dependencies(tests bittorrent)
19 endif()
20 foreach (file bittorrent connection bittorrent-messages bittorrent-peer tracker)
21   set(teshsuite_src  ${teshsuite_src}  ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/${file}.c  ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/${file}.h)
22 endforeach()
23
24 set(teshsuite_src ${teshsuite_src}  PARENT_SCOPE)
25 set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/app-bittorrent.tesh          PARENT_SCOPE)
26 set(bin_files     ${bin_files}     ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/generate.py                  PARENT_SCOPE)
27 set(xml_files     ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/app-bittorrent_d.xml
28                                    PARENT_SCOPE)
29
30 if(enable_msg)
31   foreach(x app-bittorrent cloud-two-tasks get_sender task_destroy_cancel task_listen_from io-file)
32
33     ADD_TESH_FACTORIES(tesh-msg-${x} "raw"  --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
34                                             --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/msg/${x}
35                                             --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x} 
36                                             ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x}/${x}.tesh)
37   endforeach()
38
39   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)
40 endif()