Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add some peer traces.
[simgrid.git] / examples / gras / rpc / CMakeLists.txt
index c3d99da..b790002 100644 (file)
@@ -6,7 +6,7 @@ set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/_rpc_simulator.c
                                                ${CMAKE_CURRENT_BINARY_DIR}/_rpc_server.c
                                                PROPERTIES GENERATED true)
 
-set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
+set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
 
 add_executable(rpc_simulator ${CMAKE_CURRENT_BINARY_DIR}/_rpc_simulator.c rpc.c)
 add_executable(rpc_client    ${CMAKE_CURRENT_BINARY_DIR}/_rpc_client.c    rpc.c)
@@ -20,10 +20,19 @@ add_custom_command(
          ${CMAKE_CURRENT_BINARY_DIR}/_rpc_forwarder.c
   DEPENDS gras_stub_generator ${CMAKE_CURRENT_SOURCE_DIR}/rpc.xml
   COMMAND ${CMAKE_BINARY_DIR}/bin/gras_stub_generator rpc ${CMAKE_CURRENT_SOURCE_DIR}/rpc.xml
+  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
 
 ### Add definitions for compile
-target_link_libraries(rpc_simulator simgrid pthread m -fprofile-arcs)
-target_link_libraries(rpc_client gras pthread m -fprofile-arcs)
-target_link_libraries(rpc_forwarder gras pthread m -fprofile-arcs)
-target_link_libraries(rpc_server gras pthread m -fprofile-arcs)
+if(NOT WIN32)
+target_link_libraries(rpc_simulator simgrid pthread m )
+target_link_libraries(rpc_client gras pthread m )
+target_link_libraries(rpc_forwarder gras pthread m )
+target_link_libraries(rpc_server gras pthread m )
+else(NOT WIN32)
+target_link_libraries(rpc_simulator simgrid)
+target_link_libraries(rpc_client gras)
+target_link_libraries(rpc_forwarder gras)
+target_link_libraries(rpc_server gras)
+endif(NOT WIN32)
+