Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cd2fa0dd7b9ac45ee873eb02e239ad959f945cc8
[simgrid.git] / examples / smpi / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/bin/smpicc")
4
5 set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/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 add_executable(smpi_traced smpi_traced.c)
29
30 target_link_libraries(alltoall2 m simgrid smpi )
31 target_link_libraries(alltoall_basic m simgrid smpi )
32 target_link_libraries(alltoallv m simgrid smpi )
33 target_link_libraries(allreduce m simgrid smpi )
34 target_link_libraries(bcast m simgrid smpi )
35 target_link_libraries(bcbench m simgrid smpi )
36 target_link_libraries(compute m simgrid smpi )
37 target_link_libraries(compute2 m simgrid smpi )
38 target_link_libraries(compute3 m simgrid smpi )
39 target_link_libraries(first m simgrid smpi )
40 target_link_libraries(pingpong m simgrid smpi )
41 target_link_libraries(second m simgrid smpi )
42 target_link_libraries(scatter m simgrid smpi )
43 target_link_libraries(reduce m simgrid smpi )
44 target_link_libraries(split m simgrid smpi )
45 target_link_libraries(mvmul m simgrid smpi )
46 target_link_libraries(smpi_sendrecv m simgrid smpi )
47 target_link_libraries(smpi_traced m simgrid smpi )
48
49 add_custom_command(TARGET smpi_sendrecv
50   POST_BUILD
51   COMMAND ${CMAKE_COMMAND} -E copy ./smpi_sendrecv ./sendrecv
52   WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
53 )