Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / examples / msg / icomms / CMakeLists.txt
index 870bfb4..99c106d 100644 (file)
@@ -1,12 +1,17 @@
-cmake_minimum_required(VERSION 2.6)
+foreach (example peer peer2 peer3)
+  add_executable       (${example}  ${example}.c)
+  target_link_libraries(${example}  simgrid)
+  set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/${example}.c)
+endforeach()
 
-set(EXECUTABLE_OUTPUT_PATH "${PROJECT_DIRECTORY}/examples/msg/icomms/")
+ADD_TESH_FACTORIES(msg-icomms  "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg/icomms --cd ${CMAKE_BINARY_DIR}/examples/msg/icomms ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/peer.tesh)
+ADD_TEST(msg-icomms-waitany    ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer3 ${CMAKE_HOME_DIRECTORY}/examples/platforms/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/deployment_peer05.xml)
 
-add_executable(peer peer.c)
-target_link_libraries(peer simgrid)
-
-add_executable(peer2 peer2.c)
-target_link_libraries(peer2 simgrid)
-
-add_executable(peer3 peer3.c)
-target_link_libraries(peer3 simgrid)
\ No newline at end of file
+set(examples_src  ${examples_src}                                                     PARENT_SCOPE)
+set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/peer.tesh              PARENT_SCOPE)
+set(xml_files     ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/deployment_peer.xml
+                                   ${CMAKE_CURRENT_SOURCE_DIR}/deployment_peer01.xml
+                                   ${CMAKE_CURRENT_SOURCE_DIR}/deployment_peer02.xml
+                                   ${CMAKE_CURRENT_SOURCE_DIR}/deployment_peer03.xml
+                                   ${CMAKE_CURRENT_SOURCE_DIR}/deployment_peer04.xml
+                                   ${CMAKE_CURRENT_SOURCE_DIR}/deployment_peer05.xml  PARENT_SCOPE)