${CMAKE_CURRENT_BINARY_DIR}/_ping_server.c
PROPERTIES GENERATED true)
-set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
+set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
add_executable(ping_simulator ${CMAKE_CURRENT_BINARY_DIR}/_ping_simulator.c
${CMAKE_CURRENT_SOURCE_DIR}/ping_server.c
${CMAKE_CURRENT_BINARY_DIR}/_ping_server.c
DEPENDS gras_stub_generator ${CMAKE_CURRENT_SOURCE_DIR}/ping.xml
COMMAND ${CMAKE_BINARY_DIR}/bin/gras_stub_generator ping ${CMAKE_CURRENT_SOURCE_DIR}/ping.xml
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
### Add definitions for compile
-target_link_libraries(ping_simulator simgrid pthread m -fprofile-arcs)
-target_link_libraries(ping_client gras pthread m -fprofile-arcs)
-target_link_libraries(ping_server gras pthread m -fprofile-arcs)
+if(NOT WIN32)
+target_link_libraries(ping_simulator simgrid pthread m )
+target_link_libraries(ping_client gras pthread m )
+target_link_libraries(ping_server gras pthread m )
+else(NOT WIN32)
+target_link_libraries(ping_simulator simgrid)
+target_link_libraries(ping_client gras)
+target_link_libraries(ping_server gras)
+endif(NOT WIN32)
\ No newline at end of file