Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[CMAKE] SMPI: Merge commands for .c/.cpp files
[simgrid.git] / examples / smpi / CMakeLists.txt
index e6bd3c5..7fea2c9 100644 (file)
@@ -5,16 +5,12 @@ if(enable_smpi)
 
   file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/mc/")
 
-  foreach(x replay)
-    add_executable       (smpi_${x} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.cpp)
-    target_link_libraries(smpi_${x} simgrid)
-    set_target_properties(smpi_${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
-  endforeach()
-
-  foreach(x trace trace_simple trace_call_location energy)
-    add_executable       (smpi_${x} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
+  foreach(x replay
+            trace trace_simple trace_call_location energy)
+    add_executable       (smpi_${x} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x})
     target_link_libraries(smpi_${x} simgrid)
     set_target_properties(smpi_${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
+    set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x})
   endforeach()
 
   set_target_properties(smpi_trace_call_location PROPERTIES COMPILE_FLAGS "-trace-call-location")