1 cmake_minimum_required(VERSION 2.6)
3 set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/_timer_simulator.c
4 ${CMAKE_CURRENT_BINARY_DIR}/_timer_client.c
5 PROPERTIES GENERATED true)
7 set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
9 add_executable(timer_simulator ${CMAKE_CURRENT_BINARY_DIR}/_timer_simulator.c
10 ${CMAKE_CURRENT_SOURCE_DIR}/timer.c)
11 add_executable(timer_client ${CMAKE_CURRENT_BINARY_DIR}/_timer_client.c
12 ${CMAKE_CURRENT_SOURCE_DIR}/timer.c)
15 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_timer_simulator.c
16 ${CMAKE_CURRENT_BINARY_DIR}/_timer_client.c
17 DEPENDS gras_stub_generator ${CMAKE_CURRENT_SOURCE_DIR}/timer.xml
18 COMMAND ${CMAKE_BINARY_DIR}/bin/gras_stub_generator timer ${CMAKE_CURRENT_SOURCE_DIR}/timer.xml
21 ### Add definitions for compile
22 target_link_libraries(timer_simulator simgrid pthread m -fprofile-arcs)
23 target_link_libraries(timer_client gras pthread m -fprofile-arcs)