Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[smpi] add smpireplayrun binary
[simgrid.git] / tools / cmake / MakeLib.cmake
index aa7aeac..d7f1ade 100644 (file)
@@ -88,6 +88,7 @@ if(enable_smpi)
   if(NOT ${DL_LIBRARY} STREQUAL "")
     set(SIMGRID_DEP "${SIMGRID_DEP} ${DL_LIBRARY}") # for privatization
   endif()
+
   add_executable(smpimain src/smpi/smpi_main.c)
   target_link_libraries(smpimain simgrid)
   set_target_properties(smpimain
@@ -95,6 +96,14 @@ if(enable_smpi)
   install(TARGETS smpimain # install that binary without breaking the rpath on Mac
     RUNTIME DESTINATION lib/simgrid)
 
+  add_executable(smpireplaymain src/smpi/smpi_replay_main.cpp)
+  target_compile_options(smpireplaymain PRIVATE -fpic)
+  target_link_libraries(smpireplaymain simgrid -shared)
+  set_target_properties(smpireplaymain
+    PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/simgrid)
+  install(TARGETS smpireplaymain # install that binary without breaking the rpath on Mac
+    RUNTIME DESTINATION lib/simgrid)
+
   if(SMPI_FORTRAN)
     if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
       SET(SIMGRID_DEP "${SIMGRID_DEP} -lgfortran")