X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/963aa331797f0bc1a8173af4b3970205bcbfbd0c..6a23586f55822da9d7f1ab6c5db028ab13acaccd:/examples/amok/bandwidth/CMakeLists.txt diff --git a/examples/amok/bandwidth/CMakeLists.txt b/examples/amok/bandwidth/CMakeLists.txt index 78b8485e5a..dc3872159d 100644 --- a/examples/amok/bandwidth/CMakeLists.txt +++ b/examples/amok/bandwidth/CMakeLists.txt @@ -1,15 +1,27 @@ cmake_minimum_required(VERSION 2.6) -set_source_files_properties(_bandwidth_simulator.c _bandwidth_maestro.c _bandwidth_sensor.c -PROPERTIES GENERATED true) +set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/_bandwidth_simulator.c + ${CMAKE_CURRENT_BINARY_DIR}/_bandwidth_maestro.c + ${CMAKE_CURRENT_BINARY_DIR}/_bandwidth_sensor.c + PROPERTIES GENERATED true) -set(EXECUTABLE_OUTPUT_PATH "./") -set(LIBRARY_OUTPUT_PATH "${PROJECT_DIRECTORY}/lib") +set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_SOURCE_DIR}") -add_executable(bandwidth_simulator _bandwidth_simulator.c bandwidth.c) -add_executable(bandwidth_maestro _bandwidth_maestro.c bandwidth.c) -add_executable(bandwidth_sensor _bandwidth_sensor.c bandwidth.c) +add_executable(bandwidth_simulator ${CMAKE_CURRENT_BINARY_DIR}/_bandwidth_simulator.c + ${CMAKE_CURRENT_SOURCE_DIR}/bandwidth.c) +add_executable(bandwidth_maestro ${CMAKE_CURRENT_BINARY_DIR}/_bandwidth_maestro.c + ${CMAKE_CURRENT_SOURCE_DIR}/bandwidth.c) +add_executable(bandwidth_sensor ${CMAKE_CURRENT_BINARY_DIR}/_bandwidth_sensor.c + ${CMAKE_CURRENT_SOURCE_DIR}/bandwidth.c) +add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_bandwidth_simulator.c + ${CMAKE_CURRENT_BINARY_DIR}/_bandwidth_maestro.c + ${CMAKE_CURRENT_BINARY_DIR}/_bandwidth_sensor.c + DEPENDS gras_stub_generator ${CMAKE_CURRENT_SOURCE_DIR}/bandwidth.xml + COMMAND ${CMAKE_BINARY_DIR}/bin/gras_stub_generator bandwidth ${CMAKE_CURRENT_SOURCE_DIR}/bandwidth.xml + ) + ### Add definitions for compile target_link_libraries(bandwidth_simulator simgrid pthread m -fprofile-arcs) target_link_libraries(bandwidth_maestro gras pthread m -fprofile-arcs)