Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
We can use the cluster tag without backbone link if bb_bw and bb_lat attributes are...
[simgrid.git] / examples / gras / spawn / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/_spawn_simulator.c
4                                         ${CMAKE_CURRENT_BINARY_DIR}/_spawn_server.c
5                                         PROPERTIES GENERATED true)
6
7 set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
8
9 add_executable(spawn_simulator  ${CMAKE_CURRENT_BINARY_DIR}/_spawn_simulator.c 
10                                 ${CMAKE_CURRENT_SOURCE_DIR}/spawn.c)
11 add_executable(spawn_server     ${CMAKE_CURRENT_BINARY_DIR}/_spawn_server.c 
12                                 ${CMAKE_CURRENT_SOURCE_DIR}/spawn.c)
13
14 add_custom_command(OUTPUT   ${CMAKE_CURRENT_BINARY_DIR}/_spawn_server.c
15                             ${CMAKE_CURRENT_BINARY_DIR}/_spawn_simulator.c
16                    DEPENDS gras_stub_generator ${CMAKE_CURRENT_SOURCE_DIR}/spawn.xml
17                    COMMAND ${CMAKE_BINARY_DIR}/bin/gras_stub_generator spawn ${CMAKE_CURRENT_SOURCE_DIR}/spawn.xml
18                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
19                    )
20           
21 ### Add definitions for compile
22 if(NOT WIN32)
23 target_link_libraries(spawn_simulator simgrid pthread m )
24 target_link_libraries(spawn_server gras pthread m )
25 else(NOT WIN32)
26 target_link_libraries(spawn_simulator simgrid)
27 target_link_libraries(spawn_server gras)
28 endif(NOT WIN32)