X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/18e10c8748bc9c49dadbb9f59d188614f5ac196f..37f59772746532da25dbcbfae445039828dfd178:/examples/c/CMakeLists.txt diff --git a/examples/c/CMakeLists.txt b/examples/c/CMakeLists.txt index 3ade2ce16b..25cccf5ba1 100644 --- a/examples/c/CMakeLists.txt +++ b/examples/c/CMakeLists.txt @@ -4,20 +4,20 @@ foreach(x actor-create actor-daemon actor-exiting actor-join actor-kill actor-lifetime actor-migrate actor-stacksize actor-suspend actor-yield - app-masterworker app-pingpong app-token-ring - async-wait async-waitall async-waitany + app-masterworker app-token-ring + comm-pingpong comm-wait comm-waitall comm-waitany cloud-capping cloud-masterworker cloud-migration cloud-simple dht-pastry exec-async exec-basic exec-dvfs exec-remote exec-waitany energy-exec energy-exec-ptask energy-vm - io-disk-raw io-file-remote + io-disk-raw io-file-remote io-file-system platform-failures platform-properties - plugin-hostload + plugin-host-load synchro-semaphore) - add_executable (${x}-c EXCLUDE_FROM_ALL ${x}/${x}.c) - target_link_libraries(${x}-c simgrid) - set_target_properties(${x}-c PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x}) - add_dependencies(tests ${x}-c) + add_executable (c-${x} EXCLUDE_FROM_ALL ${x}/${x}.c) + target_link_libraries(c-${x} simgrid) + set_target_properties(c-${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x}) + add_dependencies(tests c-${x}) set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh) set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c) @@ -26,10 +26,10 @@ endforeach() # Multi-files examples ###################### # bittorrent example -add_executable (app-bittorrent-c EXCLUDE_FROM_ALL app-bittorrent/app-bittorrent.c app-bittorrent/bittorrent-peer.c app-bittorrent/tracker.c) -target_link_libraries(app-bittorrent-c simgrid) -set_target_properties(app-bittorrent-c PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/app-bittorrent) -add_dependencies(tests app-bittorrent-c) +add_executable (c-app-bittorrent EXCLUDE_FROM_ALL app-bittorrent/app-bittorrent.c app-bittorrent/bittorrent-peer.c app-bittorrent/tracker.c) +target_link_libraries(c-app-bittorrent simgrid) +set_target_properties(c-app-bittorrent PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/app-bittorrent) +add_dependencies(tests c-app-bittorrent) foreach (file app-bittorrent bittorrent-peer tracker) set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/${file}.c ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/${file}.h) @@ -37,11 +37,11 @@ endforeach() # Chainsend example -add_executable (app-chainsend-c EXCLUDE_FROM_ALL app-chainsend/chainsend.c app-chainsend/broadcaster.c +add_executable (c-app-chainsend EXCLUDE_FROM_ALL app-chainsend/chainsend.c app-chainsend/broadcaster.c app-chainsend/peer.c) -target_link_libraries(app-chainsend-c simgrid) -set_target_properties(app-chainsend-c PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/app-chainsend) -add_dependencies(tests app-chainsend-c) +target_link_libraries(c-app-chainsend simgrid) +set_target_properties(c-app-chainsend PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/app-chainsend) +add_dependencies(tests c-app-chainsend) foreach (file chainsend broadcaster peer) set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/${file}.c) @@ -49,10 +49,10 @@ endforeach() set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/chainsend.h) #DHT-Kademlia -add_executable (dht-kademlia-c EXCLUDE_FROM_ALL dht-kademlia/dht-kademlia.c dht-kademlia/node.c dht-kademlia/routing_table.c dht-kademlia/message.c dht-kademlia/answer.c) -target_link_libraries(dht-kademlia-c simgrid) -set_target_properties(dht-kademlia-c PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/dht-kademlia) -add_dependencies(tests dht-kademlia-c) +add_executable (c-dht-kademlia EXCLUDE_FROM_ALL dht-kademlia/dht-kademlia.c dht-kademlia/node.c dht-kademlia/routing_table.c dht-kademlia/message.c dht-kademlia/answer.c) +target_link_libraries(c-dht-kademlia simgrid) +set_target_properties(c-dht-kademlia PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/dht-kademlia) +add_dependencies(tests c-dht-kademlia) foreach (file answer node routing_table message) set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/${file}.c ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/${file}.h) @@ -80,13 +80,13 @@ set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/actor-create/actor-cr ${CMAKE_CURRENT_SOURCE_DIR}/app-masterworker/app-masterworker_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/app-masterworker/app-masterworker-multicore_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/app-masterworker/app-masterworker-vivaldi_d.xml - ${CMAKE_CURRENT_SOURCE_DIR}/app-pingpong/app-pingpong_d.xml - ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/async-wait_d.xml - ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/async-wait2_d.xml - ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/async-wait3_d.xml - ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/async-wait4_d.xml - ${CMAKE_CURRENT_SOURCE_DIR}/async-waitall/async-waitall_d.xml - ${CMAKE_CURRENT_SOURCE_DIR}/async-waitany/async-waitany_d.xml + ${CMAKE_CURRENT_SOURCE_DIR}/comm-pingpong/comm-pingpong_d.xml + ${CMAKE_CURRENT_SOURCE_DIR}/comm-wait/comm-wait_d.xml + ${CMAKE_CURRENT_SOURCE_DIR}/comm-wait/comm-wait2_d.xml + ${CMAKE_CURRENT_SOURCE_DIR}/comm-wait/comm-wait3_d.xml + ${CMAKE_CURRENT_SOURCE_DIR}/comm-wait/comm-wait4_d.xml + ${CMAKE_CURRENT_SOURCE_DIR}/comm-waitall/comm-waitall_d.xml + ${CMAKE_CURRENT_SOURCE_DIR}/comm-waitany/comm-waitany_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/dht-kademlia_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/dht-pastry/dht-pastry_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/io-file-remote/io-file-remote_d.xml @@ -96,15 +96,15 @@ set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/actor-create/actor-cr foreach(x actor-create actor-daemon actor-exiting actor-join actor-kill actor-lifetime actor-migrate actor-stacksize actor-suspend actor-yield - app-bittorrent app-chainsend app-masterworker app-pingpong app-token-ring - async-wait async-waitall async-waitany + app-bittorrent app-chainsend app-masterworker app-token-ring + comm-pingpong comm-wait comm-waitall comm-waitany cloud-capping cloud-masterworker cloud-migration cloud-simple dht-kademlia dht-pastry exec-async exec-basic exec-dvfs exec-remote exec-waitany energy-exec energy-exec-ptask energy-vm - io-disk-raw io-file-remote + io-disk-raw io-file-remote io-file-system platform-failures platform-properties - plugin-hostload + plugin-host-load synchro-semaphore) ADD_TESH(c-${x} --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/examples/c/${x} @@ -112,12 +112,12 @@ foreach(x ${CMAKE_HOME_DIRECTORY}/examples/c/${x}/${x}.tesh) endforeach() -ADD_TESH_FACTORIES(app-masterworker-multicore "thread;ucontext;raw;boost" +ADD_TESH_FACTORIES(app-masterworker-multicore "*" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/c/app-masterworker --setenv bindir=${CMAKE_BINARY_DIR}/examples/c/app-masterworker --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms ${CMAKE_HOME_DIRECTORY}/examples/c/app-masterworker/app-masterworker-multicore.tesh) -ADD_TESH_FACTORIES(app-masterworker-vivaldi "thread;ucontext;raw;boost" +ADD_TESH_FACTORIES(app-masterworker-vivaldi "*" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/c/app-masterworker --setenv bindir=${CMAKE_BINARY_DIR}/examples/c/app-masterworker --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms @@ -126,15 +126,15 @@ ADD_TESH_FACTORIES(app-masterworker-vivaldi "thread;ucontext;raw;boost" if(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "i386" AND CMAKE_SIZEOF_VOID_P EQUAL 8) # Thread-local storage (TLS) is needed for parallel execution, but it doesn't # play well with Ucontexts on 64bit SunOS (at least on x86_64). - set(parallel-factories "thread;raw;boost") + set(parallel-factories "^ucontext") else() - set(parallel-factories "thread;ucontext;raw;boost") + set(parallel-factories "*") endif() -ADD_TESH_FACTORIES(c-app-bittorrent-parallel "raw" --cfg contexts/nthreads:4 ${CONTEXTS_SYNCHRO} - --setenv bindir=${CMAKE_BINARY_DIR}/examples/c/app-bittorrent - --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms - --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms +ADD_TESH_FACTORIES(c-app-bittorrent-parallel "raw" --cfg contexts/nthreads:4 ${CONTEXTS_SYNCHRO} + --setenv bindir=${CMAKE_BINARY_DIR}/examples/c/app-bittorrent + --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms + --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_HOME_DIRECTORY}/examples/c/app-bittorrent app-bittorrent.tesh) ADD_TESH_FACTORIES(c-dht-kademlia-parallel "${parallel-factories}" --cfg contexts/nthreads:4 ${CONTEXTS_SYNCHRO}