1 cmake_minimum_required(VERSION 2.6)
3 set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/_bandwidth_simulator.c
4 ${CMAKE_CURRENT_BINARY_DIR}/_bandwidth_maestro.c
5 ${CMAKE_CURRENT_BINARY_DIR}/_bandwidth_sensor.c
6 PROPERTIES GENERATED true)
8 set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
10 add_executable(bandwidth_simulator ${CMAKE_CURRENT_BINARY_DIR}/_bandwidth_simulator.c
11 ${CMAKE_CURRENT_SOURCE_DIR}/bandwidth.c)
12 add_executable(bandwidth_maestro ${CMAKE_CURRENT_BINARY_DIR}/_bandwidth_maestro.c
13 ${CMAKE_CURRENT_SOURCE_DIR}/bandwidth.c)
14 add_executable(bandwidth_sensor ${CMAKE_CURRENT_BINARY_DIR}/_bandwidth_sensor.c
15 ${CMAKE_CURRENT_SOURCE_DIR}/bandwidth.c)
18 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_bandwidth_simulator.c
19 ${CMAKE_CURRENT_BINARY_DIR}/_bandwidth_maestro.c
20 ${CMAKE_CURRENT_BINARY_DIR}/_bandwidth_sensor.c
21 DEPENDS gras_stub_generator ${CMAKE_CURRENT_SOURCE_DIR}/bandwidth.xml
22 COMMAND ${CMAKE_BINARY_DIR}/bin/gras_stub_generator bandwidth ${CMAKE_CURRENT_SOURCE_DIR}/bandwidth.xml
25 ### Add definitions for compile
26 target_link_libraries(bandwidth_simulator simgrid pthread m -fprofile-arcs)
27 target_link_libraries(bandwidth_maestro gras pthread m -fprofile-arcs)
28 target_link_libraries(bandwidth_sensor gras pthread m -fprofile-arcs)