X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0199ba108d66c94df94e4f044994e79efdece4b1..04297e1bfcca08d9e26bb51aacfb783f9bf97792:/examples/cpp/CMakeLists.txt diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt index a240894507..4c2538e030 100644 --- a/examples/cpp/CMakeLists.txt +++ b/examples/cpp/CMakeLists.txt @@ -33,7 +33,7 @@ if(SIMGRID_HAVE_MC) target_link_libraries(s4u-mc-bugged1-liveness simgrid) set_target_properties(s4u-mc-bugged1-liveness PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mc-bugged1-liveness) add_dependencies(tests-mc s4u-mc-bugged1-liveness) - + if(HAVE_C_STACK_CLEANER) add_executable (s4u-mc-bugged1-liveness-cleaner-on EXCLUDE_FROM_ALL s4u-mc-bugged1-liveness/s4u-mc-bugged1-liveness.cpp) target_link_libraries(s4u-mc-bugged1-liveness-cleaner-on simgrid) @@ -47,15 +47,14 @@ if(SIMGRID_HAVE_MC) endif() endif() -if(SIMGRID_HAVE_NS3) - add_executable (s4u-network-ns3 EXCLUDE_FROM_ALL network-ns3/s4u-network-ns3.cpp) - target_link_libraries(s4u-network-ns3 simgrid) - set_target_properties(s4u-network-ns3 PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/network-ns3) - add_dependencies(tests s4u-network-ns3) - add_executable (s4u-network-ns3-wifi EXCLUDE_FROM_ALL network-ns3-wifi/s4u-network-ns3-wifi.cpp) - target_link_libraries(s4u-network-ns3-wifi simgrid) - set_target_properties(s4u-network-ns3-wifi PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/network-ns3-wifi) - add_dependencies(tests s4u-network-ns3-wifi) +if(NOT HAVE_GRAPHVIZ) + set(_s4u-dag-from-dot_disable 1) +endif() + +if(NOT SIMGRID_HAVE_NS3) + foreach (example network-ns3 network-ns3-wifi) + set(_${example}_disable 1) + endforeach() endif() # Deal with each example @@ -63,24 +62,25 @@ endif() foreach (example actor-create actor-daemon actor-exiting actor-join actor-kill actor-lifetime actor-migrate actor-suspend actor-yield actor-stacksize app-bittorrent app-chainsend app-token-ring - comm-pingpong comm-ready comm-suspend comm-wait comm-waitany comm-waitall comm-waituntil - comm-dependent comm-host2host + comm-pingpong comm-ready comm-serialize comm-suspend comm-wait comm-waitany comm-waitall comm-waituntil + comm-dependent comm-host2host comm-failure comm-throttling cloud-capping cloud-migration cloud-simple + dag-comm dag-from-dot dag-failure dag-io dag-simple dht-chord dht-kademlia energy-exec energy-boot energy-link energy-vm energy-exec-ptask energy-wifi - engine-filtering + engine-filtering engine-run-partial exec-async exec-basic exec-dvfs exec-remote exec-waitany exec-waitfor exec-dependent exec-unassigned - exec-ptask exec-ptask-multicore + exec-ptask-multicore exec-cpu-nonlinear exec-cpu-factors exec-failure maestro-set mc-bugged1 mc-bugged2 mc-electric-fence mc-failing-assert - network-wifi - io-async io-file-system io-file-remote io-disk-raw io-dependent + network-ns3 network-ns3-wifi network-wifi + io-async io-priority io-degradation io-file-system io-file-remote io-disk-raw io-dependent platform-failures platform-profile platform-properties plugin-host-load plugin-link-load plugin-prodcons replay-comm replay-io routing-get-clusters synchro-barrier synchro-condition-variable synchro-condition-variable-waituntil synchro-mutex synchro-semaphore - clusters-multicpu network-factors) + clusters-multicpu network-factors network-nonlinear) # Use default source file unless specified otherwise if(NOT DEFINED _${example}_sources) @@ -104,6 +104,7 @@ foreach (example actor-create actor-daemon actor-exiting actor-join actor-kill --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/${example} --setenv libdir=${CMAKE_BINARY_DIR}/lib --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms + --setenv srcdir=${CMAKE_CURRENT_SOURCE_DIR}/${example} --cd ${CMAKE_CURRENT_SOURCE_DIR}/${example} ${CMAKE_HOME_DIRECTORY}/examples/cpp/${example}/s4u-${example}.tesh) else() @@ -125,7 +126,7 @@ endforeach() ################### # MASTERWORKERS EXAMPLE -foreach(variant fun class) +foreach(variant fun class) add_executable (s4u-app-masterworkers-${variant} EXCLUDE_FROM_ALL app-masterworkers/s4u-app-masterworkers-${variant}.cpp) target_link_libraries(s4u-app-masterworkers-${variant} simgrid) set_target_properties(s4u-app-masterworkers-${variant} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/app-masterworkers) @@ -142,25 +143,25 @@ if(SIMGRID_HAVE_MC) add_dependencies(tests-mc s4u-${example}) endif() endforeach() - + # Model-checking liveness IF(HAVE_UCONTEXT_CONTEXTS AND SIMGRID_PROCESSOR_x86_64) # liveness model-checking works only on 64bits (for now ...) add_dependencies(tests-mc s4u-mc-bugged1-liveness) - ADD_TESH(s4u-mc-bugged1-liveness-ucontext --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/mc-bugged1-liveness - --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms + ADD_TESH(s4u-mc-bugged1-liveness-ucontext --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/mc-bugged1-liveness + --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness ${CMAKE_HOME_DIRECTORY}/examples/cpp/mc-bugged1-liveness/s4u-mc-bugged1-liveness.tesh) # This example hit the 5' timeout on CI, disable it for now -# ADD_TESH(s4u-mc-bugged1-liveness-visited-ucontext --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/mc-bugged1-liveness -# --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms +# ADD_TESH(s4u-mc-bugged1-liveness-visited-ucontext --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/mc-bugged1-liveness +# --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms # --cd ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness # ${CMAKE_HOME_DIRECTORY}/examples/cpp/mc-bugged1-liveness/s4u-mc-bugged1-liveness-visited.tesh) IF(HAVE_C_STACK_CLEANER) add_dependencies(tests-mc s4u-mc-bugged1-liveness-stack-cleaner) # This test checks if the stack cleaner is making a difference: ADD_TEST(s4u-mc-bugged1-liveness-stack-cleaner ${CMAKE_HOME_DIRECTORY}/examples/cpp/mc-bugged1-liveness/s4u-mc-bugged1-liveness-stack-cleaner - ${CMAKE_HOME_DIRECTORY}/examples/cpp/mc-bugged1-liveness/ + ${CMAKE_HOME_DIRECTORY}/examples/cpp/mc-bugged1-liveness/ ${CMAKE_CURRENT_BINARY_DIR}/mc-bugged1-liveness/) ENDIF() ENDIF() @@ -180,33 +181,20 @@ else() set(parallel-factories "*") endif() -foreach(example app-bittorrent app-masterworkers +foreach(example app-bittorrent app-masterworkers dht-chord dht-kademlia ) ADD_TESH_FACTORIES(s4u-${example}-parallel "${parallel-factories}" --cfg contexts/nthreads:4 ${CONTEXTS_SYNCHRO} - --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/${example} - --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms - --cd ${CMAKE_CURRENT_SOURCE_DIR}/${example} + --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/${example} + --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms + --cd ${CMAKE_CURRENT_SOURCE_DIR}/${example} ${CMAKE_HOME_DIRECTORY}/examples/cpp/${example}/s4u-${example}.tesh) endforeach() -# ns3-tests -if(SIMGRID_HAVE_NS3) - ADD_TESH_FACTORIES(s4u-network-ns3 "*" - --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/cpp - --setenv bindir=${CMAKE_BINARY_DIR}/examples/cpp - --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms - ${CMAKE_HOME_DIRECTORY}/examples/cpp/network-ns3/s4u-network-ns3.tesh) - ADD_TESH_FACTORIES(s4u-network-ns3-wifi "*" - --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/cpp - --setenv bindir=${CMAKE_BINARY_DIR}/examples/cpp - --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms - ${CMAKE_HOME_DIRECTORY}/examples/cpp/network-ns3-wifi/s4u-network-ns3-wifi.tesh) -endif() # Examples not accepting factories ################################## -foreach (example trace-categories trace-masterworkers trace-platform trace-process-migration +foreach (example exec-ptask trace-categories trace-masterworkers trace-platform trace-process-migration trace-host-user-variables trace-link-user-variables trace-route-user-variables) add_executable (s4u-${example} EXCLUDE_FROM_ALL ${example}/s4u-${example}.cpp) target_link_libraries(s4u-${example} simgrid) @@ -215,10 +203,10 @@ foreach (example trace-categories trace-masterworkers trace-platform trace-proce set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/${example}/s4u-${example}.tesh) set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${example}/s4u-${example}.cpp) - + ADD_TESH(s4u-${example} --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/${example} --setenv srcdir=${CMAKE_CURRENT_SOURCE_DIR}/${example} - --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms + --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_CURRENT_BINARY_DIR}/${example} ${CMAKE_HOME_DIRECTORY}/examples/cpp/${example}/s4u-${example}.tesh) endforeach() @@ -238,14 +226,10 @@ endif() # Add all extra files to the archive #################################### -set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness/s4u-mc-bugged1-liveness.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/s4u-network-ns3.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3-wifi/s4u-network-ns3-wifi.cpp PARENT_SCOPE) +set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness/s4u-mc-bugged1-liveness.cpp PARENT_SCOPE) set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/comm-pingpong/simix-breakpoint.tesh ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness/s4u-mc-bugged1-liveness.tesh - ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness/s4u-mc-bugged1-liveness-visited.tesh - ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/s4u-network-ns3.tesh - ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3-wifi/s4u-network-ns3-wifi.tesh PARENT_SCOPE) + ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness/s4u-mc-bugged1-liveness-visited.tesh PARENT_SCOPE) set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/actor-create/s4u-actor-create_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/actor-lifetime/s4u-actor-lifetime_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/actor-yield/s4u-actor-yield_d.xml @@ -276,7 +260,8 @@ set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/actor-create/s4u-a set(bin_files ${bin_files} ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/generate.py ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness/s4u-mc-bugged1-liveness-stack-cleaner ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness/promela_bugged1_liveness PARENT_SCOPE) -set(txt_files ${txt_files} ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split-p0.txt +set(txt_files ${txt_files} ${CMAKE_CURRENT_SOURCE_DIR}/dag-from-dot/dag.dot + ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split-p0.txt ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split-p1.txt ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm.txt ${CMAKE_CURRENT_SOURCE_DIR}/replay-io/s4u-replay-io.txt PARENT_SCOPE)