Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't use reserved keywords.
[simgrid.git] / examples / gras / all2all / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/_all2all_simulator.c
4                                                         ${CMAKE_CURRENT_BINARY_DIR}/_all2all_sender.c
5                                                         ${CMAKE_CURRENT_BINARY_DIR}/_all2all_receiver.c
6                                                         PROPERTIES GENERATED true)
7
8 set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
9
10 add_executable(all2all_simulator        ${CMAKE_CURRENT_BINARY_DIR}/_all2all_simulator.c
11                                                                         ${CMAKE_CURRENT_SOURCE_DIR}/all2all.c)
12 add_executable(all2all_sender   ${CMAKE_CURRENT_BINARY_DIR}/_all2all_sender.c
13                                                                 ${CMAKE_CURRENT_SOURCE_DIR}/all2all.c)
14 add_executable(all2all_receiver ${CMAKE_CURRENT_BINARY_DIR}/_all2all_receiver.c
15                                                                 ${CMAKE_CURRENT_SOURCE_DIR}/all2all.c)
16                                                                 
17 add_custom_command(
18                                         OUTPUT  ${CMAKE_CURRENT_BINARY_DIR}/_all2all_simulator.c
19                                                         ${CMAKE_CURRENT_BINARY_DIR}/_all2all_sender.c
20                                                         ${CMAKE_CURRENT_BINARY_DIR}/_all2all_receiver.c
21                                         DEPENDS gras_stub_generator ${CMAKE_CURRENT_SOURCE_DIR}/all2all.xml
22                                         COMMAND ${CMAKE_BINARY_DIR}/bin/gras_stub_generator all2all ${CMAKE_CURRENT_SOURCE_DIR}/all2all.xml
23                                         WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
24                                         )
25
26 ### Add definitions for compile
27 if(NOT WIN32)
28 target_link_libraries(all2all_simulator simgrid pthread m )
29 target_link_libraries(all2all_sender gras pthread m )
30 target_link_libraries(all2all_receiver gras pthread m )
31 else(NOT WIN32)
32 target_link_libraries(all2all_simulator simgrid)
33 target_link_libraries(all2all_sender gras)
34 target_link_libraries(all2all_receiver gras)
35 endif(NOT WIN32)
36