Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[CMAKE] SMPI: Merge commands for .c/.cpp files
authorChristian Heinrich <franz-christian.heinrich@inria.fr>
Tue, 5 Jun 2018 13:16:31 +0000 (15:16 +0200)
committerChristian Heinrich <franz-christian.heinrich@inria.fr>
Thu, 21 Jun 2018 09:55:36 +0000 (11:55 +0200)
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")