X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/781aee7fedc47a3c0acc35a738b0ffdecdb15211..3bf461a6fde008496a9aa80dab235b98bda0dbdc:/examples/c/CMakeLists.txt diff --git a/examples/c/CMakeLists.txt b/examples/c/CMakeLists.txt index 6f52d4604d..1bd07556bf 100644 --- a/examples/c/CMakeLists.txt +++ b/examples/c/CMakeLists.txt @@ -1,6 +1,16 @@ +# Regular examples: with only one source and tested with all factories +###################################################################### + foreach(x - actor-create actor-daemon actor-join actor-kill - app-pingpong app-token-ring async-waitany io-disk-raw) + actor-create actor-daemon actor-exiting actor-join actor-kill actor-lifetime actor-migrate actor-suspend + actor-yield + app-pingpong app-token-ring + async-wait async-waitall async-waitany + cloud-capping cloud-migration cloud-simple + exec-basic exec-dvfs + energy-exec energy-exec-ptask energy-vm + io-disk-raw io-file-remote + plugin-hostload) 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}) @@ -10,17 +20,52 @@ foreach(x set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c) endforeach() +# Multi-files examples +###################### +# Chainsend example + +add_executable (app-chainsend-c 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) + +foreach (file chainsend broadcaster peer) + set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/${file}.c) +endforeach() +set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/chainsend.h) + +# Add all extra files to the archive +#################################### + set(teshsuite_src ${teshsuite_src} PARENT_SCOPE) -set(tesh_files ${tesh_files} PARENT_SCOPE) +set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/app-chainsend.tesh + PARENT_SCOPE) set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/actor-create/actor-create_d.xml + ${CMAKE_CURRENT_SOURCE_DIR}/actor-lifetime/actor-lifetime_d.xml + ${CMAKE_CURRENT_SOURCE_DIR}/actor-yield/actor-yield_d.xml + ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/app-chainsend_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}/io-file-remote/io-file-remote_d.xml PARENT_SCOPE) foreach(x - actor-create actor-daemon actor-join actor-kill - app-pingpong app-token-ring async-waitany io-disk-raw) + actor-create actor-daemon actor-exiting actor-join actor-kill actor-lifetime actor-migrate actor-suspend + actor-yield + app-chainsend app-pingpong app-token-ring + async-wait async-waitall async-waitany + cloud-capping cloud-migration cloud-simple + exec-basic exec-dvfs + energy-exec energy-exec-ptask energy-vm + io-disk-raw io-file-remote + plugin-hostload) ADD_TESH(c-${x} --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/examples/c/${x} --cd ${CMAKE_HOME_DIRECTORY}/examples/c/${x}