Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
use C++11 threads for portability
[simgrid.git] / examples / msg / CMakeLists.txt
index 4805d49..d1b2acc 100644 (file)
@@ -1,8 +1,9 @@
+# C examples
 foreach(x actions-comm actions-storage app-masterworker app-pingpong app-pmm app-token-ring async-wait async-waitall 
-          async-waitany cloud-capping cloud-masterworker cloud-migration cloud-multicore cloud-simple cloud-two-tasks
+          async-waitany cloud-capping cloud-masterworker cloud-migration cloud-simple cloud-two-tasks
           dht-chord dht-pastry energy-consumption energy-onoff energy-pstate energy-ptask energy-vm platform-failures 
           io-file io-remote io-storage task-priority process-create process-kill process-migration process-suspend 
-          platform-properties maestro-set process-startkilltime synchro-semaphore trace-categories 
+          platform-properties process-startkilltime synchro-semaphore trace-categories 
           trace-route-user-variables trace-link-user-variables trace-masterworker trace-platform 
           trace-process-migration trace-host-user-variables)
   add_executable       (${x}     ${x}/${x}.c)
@@ -12,6 +13,15 @@ foreach(x actions-comm actions-storage app-masterworker app-pingpong app-pmm app
   set(tesh_files   ${tesh_files}   ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
 endforeach()
 
+# CPP examples
+foreach(x maestro-set)
+  add_executable       (${x}     ${x}/${x}.cpp)
+  target_link_libraries(${x}     simgrid)
+  set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
+  set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
+  set(tesh_files   ${tesh_files}   ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
+endforeach()
+
 if(HAVE_NS3)
   add_executable       (network-ns3 network-ns3/network-ns3.c)
   target_link_libraries(network-ns3 simgrid)
@@ -54,6 +64,7 @@ set(bin_files    ${bin_files}     ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/gen
                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/generate.py
                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/generate.py                     PARENT_SCOPE)
 set(examples_src ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/chainsend.c
+                                  ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/dht-chord.h
                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/common.h
                                   ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/network-ns3.c                    PARENT_SCOPE)
 set(tesh_files   ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/app-bittorrent.tesh
@@ -83,7 +94,7 @@ set(xml_files    ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/actio
                                   ${CMAKE_CURRENT_SOURCE_DIR}/process-startkilltime/start_kill_d.xml       PARENT_SCOPE)
 
 foreach(x actions-comm actions-storage app-bittorrent app-chainsend app-masterworker app-pingpong app-token-ring
-          async-wait async-waitall async-waitany cloud-capping cloud-masterworker cloud-migration cloud-simple cloud-multicore
+          async-wait async-waitall async-waitany cloud-capping cloud-masterworker cloud-migration cloud-simple 
           cloud-two-tasks dht-chord dht-pastry dht-kademlia platform-failures io-file io-remote io-storage task-priority 
           process-create process-kill process-migration process-suspend platform-properties synchro-semaphore 
           process-startkilltime)