Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix some tests failing in out of source builds
[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   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
8
9   file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/mc/")
10
11   foreach(x bcbench mvmul replay trace trace_simple energy)
12     add_executable       (smpi_${x} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
13     target_link_libraries(smpi_${x} simgrid)
14     set_target_properties(smpi_${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
15     set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
16   endforeach()
17
18   foreach(x bugged1 bugged2 bugged1_liveness only_send_deterministic mutual_exclusion non_termination1 
19             non_termination2 non_termination3 non_termination4)
20     if(HAVE_MC)
21       add_executable       (smpi_${x} ${CMAKE_CURRENT_SOURCE_DIR}/mc/${x}.c)
22       target_link_libraries(smpi_${x} simgrid)
23       set_target_properties(smpi_${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mc)
24      endif()
25     set(examples_src  ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/mc/${x}.c)
26   endforeach()
27 endif()
28
29 set(examples_src  ${examples_src}                                                                          PARENT_SCOPE)
30 set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/energy/energy.tesh
31                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace/trace.tesh
32                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_simple/trace_simple.tesh
33                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/replay.tesh                          PARENT_SCOPE)
34 set(bin_files     ${bin_files}     ${CMAKE_CURRENT_SOURCE_DIR}/hostfile
35                                    ${CMAKE_CURRENT_SOURCE_DIR}/energy/hostfile
36                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/promela_bugged1_liveness
37                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_bugged1_liveness
38                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_bugged1
39                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_bugged2
40                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_only_send_deterministic
41                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_mutual_exclusion
42                                    ${CMAKE_CURRENT_SOURCE_DIR}/mc/hostfile_non_termination                 PARENT_SCOPE)
43 set(txt_files     ${txt_files}     ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions0.txt
44                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions1.txt
45                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_allReduce.txt
46                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_allgatherv.txt
47                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_alltoall.txt
48                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_alltoallv.txt
49                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_barrier.txt
50                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_bcast.txt
51                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_bcast_reduce_datatypes.txt
52                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_gather.txt
53                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_reducescatter.txt
54                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_waitall.txt
55                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_with_isend.txt
56                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/split_traces                         PARENT_SCOPE)
57
58 if(enable_smpi)
59   if(HAVE_MC)
60     ADD_TESH(smpi-mc-only-send-determinism --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/mc --cd ${CMAKE_BINARY_DIR}/examples/smpi/mc ${CMAKE_HOME_DIRECTORY}/examples/smpi/mc/only_send_deterministic.tesh)
61   endif()
62
63   ADD_TESH(smpi-tracing        --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/trace/trace.tesh)
64   ADD_TESH(smpi-tracing-simple --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/trace_simple/trace_simple.tesh)
65   ADD_TESH(smpi-replay         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/replay.tesh)
66   ADD_TESH_FACTORIES(smpi-energy "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/energy --cd ${CMAKE_BINARY_DIR}/examples/smpi/energy ${CMAKE_HOME_DIRECTORY}/examples/smpi/energy/energy.tesh)
67 endif()