Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
0946929fcf562ee2ed77303db4ae27e512e9f20e
[simgrid.git] / examples / smpi / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 set(CMAKE_C_COMPILER "${PROJECT_DIRECTORY}/src/smpi/smpicc")
4
5 set(EXECUTABLE_OUTPUT_PATH "${PROJECT_DIRECTORY}/examples/smpi/")
6 set(flags "-Dmain=smpi_simulated_main")
7 set(INCLUDES_bis "-I${PROJECT_DIRECTORY}/include/smpi")
8
9 add_definitions (${INCLUDES_bis} ${flags})
10
11 add_executable(alltoall2 alltoall2.c )
12 add_executable(alltoall_basic alltoall_basic.c)
13 add_executable(alltoallv alltoallv.c)
14 add_executable(allreduce allreduce.c)
15 add_executable(bcast bcast.c)
16 add_executable(bcbench bcbench.c)
17 add_executable(compute compute.c)
18 add_executable(compute2 compute2.c)
19 add_executable(compute3 compute3.c)
20 add_executable(first mvmul.c)
21 add_executable(pingpong pingpong.c)
22 add_executable(second second.c)
23 add_executable(scatter scatter.c)
24 add_executable(reduce reduce.c)
25 add_executable(split split.c)
26 add_executable(mvmul mvmul.c)
27 add_executable(smpi_sendrecv sendrecv.c)
28
29 target_link_libraries(alltoall2 m simgrid smpi -fprofile-arcs)
30 target_link_libraries(alltoall_basic m simgrid smpi -fprofile-arcs)
31 target_link_libraries(alltoallv m simgrid smpi -fprofile-arcs)
32 target_link_libraries(allreduce m simgrid smpi -fprofile-arcs)
33 target_link_libraries(bcast m simgrid smpi -fprofile-arcs)
34 target_link_libraries(bcbench m simgrid smpi -fprofile-arcs)
35 target_link_libraries(compute m simgrid smpi -fprofile-arcs)
36 target_link_libraries(compute2 m simgrid smpi -fprofile-arcs)
37 target_link_libraries(compute3 m simgrid smpi -fprofile-arcs)
38 target_link_libraries(first m simgrid smpi -fprofile-arcs)
39 target_link_libraries(pingpong m simgrid smpi -fprofile-arcs)
40 target_link_libraries(second m simgrid smpi -fprofile-arcs)
41 target_link_libraries(scatter m simgrid smpi -fprofile-arcs)
42 target_link_libraries(reduce m simgrid smpi -fprofile-arcs)
43 target_link_libraries(split m simgrid smpi -fprofile-arcs)
44 target_link_libraries(mvmul m simgrid smpi -fprofile-arcs)
45 target_link_libraries(smpi_sendrecv m simgrid smpi -fprofile-arcs)
46
47 add_custom_command(TARGET smpi_sendrecv
48 POST_BUILD
49 COMMAND "cp" 
50 ARGS ./smpi_sendrecv ./sendrecv
51 WORKING_DIRECTORY "${PROJECT_DIRECTORY}/examples/smpi"
52 )