Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix compilation with tracing and new network_element_t
[simgrid.git] / examples / gras / properties / CMakeLists.txt
index ab5453b..cd83b22 100644 (file)
@@ -5,7 +5,7 @@ set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/_properties_simulator.c
                                                        ${CMAKE_CURRENT_BINARY_DIR}/_properties_bob.c
                                                        PROPERTIES GENERATED true)
 
-set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
+set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
 
 add_executable(properties_simulator ${CMAKE_CURRENT_BINARY_DIR}/_properties_simulator.c
                                                                        ${CMAKE_CURRENT_SOURCE_DIR}/properties.c)
@@ -19,9 +19,17 @@ add_custom_command(
                                                        ${CMAKE_CURRENT_BINARY_DIR}/_properties_bob.c
                                        DEPENDS gras_stub_generator ${CMAKE_CURRENT_SOURCE_DIR}/properties.xml
                                        COMMAND ${CMAKE_BINARY_DIR}/bin/gras_stub_generator properties ${CMAKE_CURRENT_SOURCE_DIR}/properties.xml
+                                       WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
                                        )
                                        
 ### Add definitions for compile
-target_link_libraries(properties_simulator simgrid pthread m -fprofile-arcs)
-target_link_libraries(properties_alice gras pthread m -fprofile-arcs)
-target_link_libraries(properties_bob gras pthread m -fprofile-arcs)
+if(NOT WIN32)
+target_link_libraries(properties_simulator simgrid pthread m )
+target_link_libraries(properties_alice gras pthread m )
+target_link_libraries(properties_bob gras pthread m )
+else(NOT WIN32)
+target_link_libraries(properties_simulator simgrid)
+target_link_libraries(properties_alice gras)
+target_link_libraries(properties_bob gras)
+endif(NOT WIN32)
+