X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0d1c9172064ba746ed23e4e36146a3605491f5fa..f2ad0175ed569f3cfa5df330ec4174d7fe7b1229:/examples/msg/mc/CMakeLists.txt diff --git a/examples/msg/mc/CMakeLists.txt b/examples/msg/mc/CMakeLists.txt index f330a040e8..4361496e43 100644 --- a/examples/msg/mc/CMakeLists.txt +++ b/examples/msg/mc/CMakeLists.txt @@ -1,32 +1,71 @@ -cmake_minimum_required(VERSION 2.6) +if(HAVE_MC) + set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}") -set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}") + add_executable(centralized centralized_mutex.c) + add_executable(bugged1 bugged1.c) + add_executable(bugged2 bugged2.c) + add_executable(bugged3 bugged3.c) + add_executable(electric_fence electric_fence.c) + add_executable(bugged1_liveness bugged1_liveness.c) + add_executable(bugged2_liveness bugged2_liveness.c) -add_executable(centralized centralized_mutex.c) -add_executable(bugged1 bugged1.c) -add_executable(bugged1_stateful bugged1_stateful.c) -add_executable(bugged2_stateful bugged2_stateful.c) -add_executable(bugged2 bugged2.c) -add_executable(bugged3 bugged3.c) -add_executable(random_test random_test.c) -add_executable(example_liveness_without_cycle automaton.c -automatonparse_promela.c example_liveness_without_cycle.c) -add_executable(example2_liveness_without_cycle automaton.c -automatonparse_promela.c -example2_liveness_without_cycle.c) -add_executable(example_liveness_with_cycle automaton.c -automatonparse_promela.c example_liveness_with_cycle.c) + target_link_libraries(centralized simgrid ) + target_link_libraries(bugged1 simgrid ) + target_link_libraries(bugged2 simgrid ) + target_link_libraries(bugged3 simgrid ) + target_link_libraries(electric_fence simgrid ) + target_link_libraries(bugged1_liveness simgrid ) + target_link_libraries(bugged2_liveness simgrid ) + if(HAVE_C_STACK_CLEANER) + add_executable(bugged1_liveness_cleaner_on bugged1_liveness.c ) + add_executable(bugged1_liveness_cleaner_off bugged1_liveness.c ) + target_link_libraries(bugged1_liveness_cleaner_on simgrid ) + target_link_libraries(bugged1_liveness_cleaner_off simgrid ) + set_target_properties(bugged1_liveness_cleaner_on PROPERTIES COMPILE_FLAGS "-DGARBAGE_STACK -fstack-cleaner") + set_target_properties(bugged1_liveness_cleaner_off PROPERTIES COMPILE_FLAGS "-DGARBAGE_STACK -fno-stack-cleaner") + endif() +endif() -target_link_libraries(centralized simgrid m ) -target_link_libraries(bugged1 simgrid m ) -target_link_libraries(bugged1_stateful simgrid m) -target_link_libraries(bugged2_stateful simgrid m) -target_link_libraries(bugged2 simgrid m ) -target_link_libraries(bugged3 simgrid m ) -target_link_libraries(random_test simgrid m ) -target_link_libraries(example_liveness_without_cycle simgrid m ) -target_link_libraries(example2_liveness_without_cycle simgrid m ) -target_link_libraries(example_liveness_with_cycle simgrid m ) +set(tesh_files + ${tesh_files} + ${CMAKE_CURRENT_SOURCE_DIR}/bugged1.tesh + ${CMAKE_CURRENT_SOURCE_DIR}/bugged2.tesh + ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_liveness.tesh + ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_liveness_visited.tesh + ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_liveness_sparse.tesh + ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_liveness_visited_sparse.tesh + ${CMAKE_CURRENT_SOURCE_DIR}/centralized.tesh + PARENT_SCOPE) +set(xml_files + ${xml_files} + ${CMAKE_CURRENT_SOURCE_DIR}/deploy_bugged1_liveness.xml + ${CMAKE_CURRENT_SOURCE_DIR}/deploy_bugged1_liveness_visited.xml + ${CMAKE_CURRENT_SOURCE_DIR}/deploy_bugged1.xml + ${CMAKE_CURRENT_SOURCE_DIR}/deploy_bugged2_liveness.xml + ${CMAKE_CURRENT_SOURCE_DIR}/deploy_bugged2.xml + ${CMAKE_CURRENT_SOURCE_DIR}/deploy_bugged3.xml + ${CMAKE_CURRENT_SOURCE_DIR}/deploy_electric_fence.xml + ${CMAKE_CURRENT_SOURCE_DIR}/deploy_mutex.xml + ${CMAKE_CURRENT_SOURCE_DIR}/platform.xml + PARENT_SCOPE) +set(examples_src + ${examples_src} + ${CMAKE_CURRENT_SOURCE_DIR}/bugged1.c + ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_liveness.c + ${CMAKE_CURRENT_SOURCE_DIR}/bugged2.c + ${CMAKE_CURRENT_SOURCE_DIR}/bugged2_liveness.c + ${CMAKE_CURRENT_SOURCE_DIR}/bugged3.c + ${CMAKE_CURRENT_SOURCE_DIR}/electric_fence.c + ${CMAKE_CURRENT_SOURCE_DIR}/centralized_mutex.c + ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_liveness.h + ${CMAKE_CURRENT_SOURCE_DIR}/bugged2_liveness.h + PARENT_SCOPE) +set(bin_files + ${bin_files} + ${CMAKE_CURRENT_SOURCE_DIR}/promela_bugged1_liveness + ${CMAKE_CURRENT_SOURCE_DIR}/promela_bugged2_liveness + ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_liveness_stack_cleaner + PARENT_SCOPE)