Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / examples / smpi / CMakeLists.txt
1 if(enable_smpi)
2   if(WIN32)
3     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
4   else()
5     set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
6   endif()
7
8   set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
9
10   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
11   file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/mc/")
12
13
14   add_executable(bcbench bcbench.c)
15   add_executable(mvmul mvmul.c)
16   add_executable(smpi_traced tracing/smpi_traced.c)
17   add_executable(smpi_traced_simple tracing/smpi_traced_simple.c)
18   add_executable(smpi_replay replay/replay.c)
19
20   target_link_libraries(bcbench simgrid)
21   target_link_libraries(mvmul simgrid)
22   target_link_libraries(smpi_traced simgrid)
23   target_link_libraries(smpi_traced_simple simgrid)
24   target_link_libraries(smpi_replay simgrid)
25
26   if(HAVE_MC)
27     add_executable(smpi_bugged1 mc/bugged1.c)
28     add_executable(smpi_bugged2 mc/bugged2.c)
29     add_executable(smpi_bugged1_liveness mc/bugged1_liveness.c)
30     add_executable(smpi_only_send_deterministic mc/only_send_deterministic.c)
31     add_executable(smpi_mutual_exclusion mc/mutual_exclusion.c)
32     add_executable(smpi_non_termination1 mc/non_termination1.c)
33     add_executable(smpi_non_termination2 mc/non_termination2.c)
34     add_executable(smpi_non_termination3 mc/non_termination3.c)
35     add_executable(smpi_non_termination4 mc/non_termination4.c)
36
37     target_link_libraries(smpi_bugged1 simgrid)
38     target_link_libraries(smpi_bugged2 simgrid)
39     target_link_libraries(smpi_bugged1_liveness simgrid)
40     target_link_libraries(smpi_only_send_deterministic simgrid)
41     target_link_libraries(smpi_mutual_exclusion simgrid)
42     target_link_libraries(smpi_non_termination1 simgrid)
43     target_link_libraries(smpi_non_termination2 simgrid)
44     target_link_libraries(smpi_non_termination3 simgrid)
45     target_link_libraries(smpi_non_termination4 simgrid)
46     
47     set_target_properties(smpi_bugged1 PROPERTIES RUNTIME_OUTPUT_DIRECTORY "./mc")
48     set_target_properties(smpi_bugged2 PROPERTIES RUNTIME_OUTPUT_DIRECTORY "./mc")
49     set_target_properties(smpi_bugged1_liveness PROPERTIES RUNTIME_OUTPUT_DIRECTORY "./mc")
50     set_target_properties(smpi_only_send_deterministic PROPERTIES RUNTIME_OUTPUT_DIRECTORY "./mc")
51     set_target_properties(smpi_mutual_exclusion PROPERTIES RUNTIME_OUTPUT_DIRECTORY "./mc")
52     set_target_properties(smpi_non_termination1 PROPERTIES RUNTIME_OUTPUT_DIRECTORY "./mc")
53     set_target_properties(smpi_non_termination2 PROPERTIES RUNTIME_OUTPUT_DIRECTORY "./mc")
54     set_target_properties(smpi_non_termination3 PROPERTIES RUNTIME_OUTPUT_DIRECTORY "./mc")
55     set_target_properties(smpi_non_termination4 PROPERTIES RUNTIME_OUTPUT_DIRECTORY "./mc")
56     
57   endif()
58   
59 endif()
60
61 set(tesh_files
62   ${tesh_files}
63   ${CMAKE_CURRENT_SOURCE_DIR}/tracing/smpi_traced.tesh
64   ${CMAKE_CURRENT_SOURCE_DIR}/replay/smpi_replay.tesh
65   PARENT_SCOPE
66   )
67 set(xml_files
68   ${xml_files}
69   PARENT_SCOPE
70   )
71 set(examples_src
72   ${examples_src}
73   ${CMAKE_CURRENT_SOURCE_DIR}/mvmul.c
74   ${CMAKE_CURRENT_SOURCE_DIR}/bcbench.c
75   ${CMAKE_CURRENT_SOURCE_DIR}/replay/replay.c
76   ${CMAKE_CURRENT_SOURCE_DIR}/tracing/smpi_traced.c
77   ${CMAKE_CURRENT_SOURCE_DIR}/tracing/smpi_traced_simple.c
78   ${CMAKE_CURRENT_SOURCE_DIR}/mc/bugged2.c
79   ${CMAKE_CURRENT_SOURCE_DIR}/mc/bugged1.c
80   ${CMAKE_CURRENT_SOURCE_DIR}/mc/bugged1_liveness.c
81   ${CMAKE_CURRENT_SOURCE_DIR}/mc/only_send_deterministic.c
82   ${CMAKE_CURRENT_SOURCE_DIR}/mc/mutual_exclusion.c
83   ${CMAKE_CURRENT_SOURCE_DIR}/mc/non_termination1.c
84   ${CMAKE_CURRENT_SOURCE_DIR}/mc/non_termination2.c
85   ${CMAKE_CURRENT_SOURCE_DIR}/mc/non_termination3.c
86   ${CMAKE_CURRENT_SOURCE_DIR}/mc/non_termination4.c
87   PARENT_SCOPE
88   )
89 set(bin_files
90   ${bin_files}
91   ${CMAKE_CURRENT_SOURCE_DIR}/hostfile
92   ${CMAKE_CURRENT_SOURCE_DIR}/mc/promela_bugged1_liveness
93   ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_bugged1_liveness
94   ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_bugged1
95   ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_bugged2
96   ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_only_send_deterministic
97   ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_mutual_exclusion
98   ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_non_termination
99   PARENT_SCOPE
100   )
101 set(txt_files
102   ${txt_files}
103   ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions0.txt
104   ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions1.txt
105   ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_allReduce.txt
106   ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_allgatherv.txt
107   ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_alltoall.txt
108   ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_alltoallv.txt
109   ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_barrier.txt
110   ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_bcast.txt
111   ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_bcast_reduce_datatypes.txt
112   ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_gather.txt
113   ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_reducescatter.txt
114   ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_waitall.txt
115   ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_with_isend.txt
116   ${CMAKE_CURRENT_SOURCE_DIR}/replay/split_traces
117   PARENT_SCOPE
118   )