Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
factoring in examples/msg/masterslave
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 7 Mar 2016 08:52:39 +0000 (09:52 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 7 Mar 2016 08:58:29 +0000 (09:58 +0100)
 this directory is a mess ... and the first one we tell users to look at

examples/msg/masterslave/CMakeLists.txt
tools/cmake/Tests.cmake

index bd7a720..61c4c46 100644 (file)
@@ -1,46 +1,39 @@
-add_executable       (masterslave_failure   masterslave_failure.c)
-target_link_libraries(masterslave_failure   simgrid)
-add_executable       (masterslave_forwarder masterslave_forwarder.c)
-target_link_libraries(masterslave_forwarder simgrid )
-add_executable       (masterslave_mailbox   masterslave_mailbox.c)
-target_link_libraries(masterslave_mailbox   simgrid)
-add_executable       (masterslave_kill      masterslave_kill.c)
-target_link_libraries(masterslave_kill      simgrid)
+foreach (example masterslave_failure masterslave_forwarder masterslave_mailbox)
+  add_executable       (${example} ${example}.c)
+  target_link_libraries(${example} simgrid)
+  set(examples_src  ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${example}.c)
+  set(tesh_files  ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/${example}.tesh 
+                                ${CMAKE_CURRENT_SOURCE_DIR}/${example}_crosstraffic.tesh)
+
+  ADD_TESH_FACTORIES(msg-${example} "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/${example}_crosstraffic.tesh)
+  ADD_TESH_FACTORIES(msg-${example}-no-crosstraffic   "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/${example}.tesh)
+endforeach()
+
 add_executable       (masterslave_arg       masterslave_arg.c)
 target_link_libraries(masterslave_arg       simgrid)
+add_executable       (masterslave_kill      masterslave_kill.c)
+target_link_libraries(masterslave_kill      simgrid)
 
-set(tesh_files
-  ${tesh_files}
-  ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_cpu_ti.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_forwarder_crosstraffic.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_mailbox.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_cas01_im.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_crosstraffic.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_forwarder.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_multicore.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_failure_crosstraffic.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_kill.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/masterslave.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_cpu_ti_crosstraffic.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_failure.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_mailbox_crosstraffic.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_vivaldi.tesh
-  PARENT_SCOPE)
-set(xml_files
-  ${xml_files}
-  ${CMAKE_CURRENT_SOURCE_DIR}/deployment_masterslave_forwarder.xml
-  ${CMAKE_CURRENT_SOURCE_DIR}/deployment_masterslave_mailbox_multicore.xml
-  ${CMAKE_CURRENT_SOURCE_DIR}/deployment_masterslave_vivaldi.xml
-  ${CMAKE_CURRENT_SOURCE_DIR}/deployment_masterslave_kill.xml
-  ${CMAKE_CURRENT_SOURCE_DIR}/deployment_masterslave_mailbox.xml
-  ${CMAKE_CURRENT_SOURCE_DIR}/deployment_masterslave.xml
-  PARENT_SCOPE)
-set(examples_src
-  ${examples_src}
-  ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_arg.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_failure.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_forwarder.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_kill.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_mailbox.c
-  PARENT_SCOPE)
+ADD_TESH_FACTORIES(msg-masterslave             "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_crosstraffic.tesh)
+ADD_TESH_FACTORIES(msg-masterslave-kill        "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_kill.tesh)
+ADD_TESH_FACTORIES(msg-masterslave-multicore   "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_multicore.tesh)
+ADD_TESH_FACTORIES(msg-masterslave-cpu-ti      "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/masterslave --cd ${CMAKE_HOME_DIRECTORY}/examples/msg masterslave/masterslave_cpu_ti_crosstraffic.tesh)
+ADD_TESH_FACTORIES(msg-masterslave-vivaldi     "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_vivaldi.tesh)
+ADD_TESH_FACTORIES(msg-masterslave-no-crosstraffic "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave.tesh)
 
+set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_arg.c
+                                   ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_kill.c                          PARENT_SCOPE)
+set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/masterslave.tesh
+                                   ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_crosstraffic.tesh
+                                   ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_kill.tesh
+                                   ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_cpu_ti.tesh
+                                   ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_cpu_ti_crosstraffic.tesh
+                                   ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_cas01_im.tesh
+                                   ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_multicore.tesh
+                                   ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_vivaldi.tesh                    PARENT_SCOPE)
+set(xml_files   ${xml_files}       ${CMAKE_CURRENT_SOURCE_DIR}/deployment_masterslave_forwarder.xml
+                                   ${CMAKE_CURRENT_SOURCE_DIR}/deployment_masterslave_mailbox.xml
+                                   ${CMAKE_CURRENT_SOURCE_DIR}/deployment_masterslave_kill.xml
+                                   ${CMAKE_CURRENT_SOURCE_DIR}/deployment_masterslave_mailbox_multicore.xml
+                                   ${CMAKE_CURRENT_SOURCE_DIR}/deployment_masterslave_vivaldi.xml
+                                   ${CMAKE_CURRENT_SOURCE_DIR}/deployment_masterslave.xml                  PARENT_SCOPE)
index 4d13631..25793ed 100644 (file)
@@ -128,19 +128,7 @@ IF(NOT enable_memcheck)
   ## INTERFACES ##
   ### MSG ###
   # BEGIN TESH TESTS
-  ADD_TESH_FACTORIES(msg-masterslave-kill        "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_kill.tesh)
-  ADD_TESH_FACTORIES(msg-masterslave-multicore   "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_multicore.tesh)
-  ADD_TESH_FACTORIES(msg-masterslave-no-crosstraffic-mailbox   "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_mailbox.tesh)
-  ADD_TESH_FACTORIES(msg-masterslave-no-crosstraffic           "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave.tesh)
-  ADD_TESH_FACTORIES(msg-masterslave-no-crosstraffic-forwarder "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_forwarder.tesh)
-  ADD_TESH_FACTORIES(msg-masterslave-no-crosstraffic-failure   "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_failure.tesh)
-  ADD_TESH_FACTORIES(msg-masterslave             "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_crosstraffic.tesh)
-  ADD_TESH_FACTORIES(msg-masterslave-forwarder   "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_forwarder_crosstraffic.tesh)
-  ADD_TESH_FACTORIES(msg-masterslave-failure     "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_failure_crosstraffic.tesh)
-  ADD_TESH_FACTORIES(msg-masterslave-mailbox     "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_mailbox_crosstraffic.tesh)
-  ADD_TESH_FACTORIES(msg-masterslave-cpu-ti      "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/masterslave --cd ${CMAKE_HOME_DIRECTORY}/examples/msg masterslave/masterslave_cpu_ti_crosstraffic.tesh)
-  ADD_TESH_FACTORIES(msg-masterslave-vivaldi     "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_vivaldi.tesh)
-  
+
   ADD_TESH(tracing-ms                          --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/ms.tesh)
   ADD_TESH(tracing-trace-platform              --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/trace_platform.tesh)
   ADD_TESH(tracing-user-variables              --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/user_variables.tesh)