Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
don't link_set after link_add to not erase the -shared flag
[simgrid.git] / src / smpi / smpiff.in
index 5361c3b..dc8f60f 100644 (file)
@@ -16,7 +16,12 @@ CMAKE_LINKARGS="-L@libdir@"
 @SMPITOOLS_SH@
 
 list_set FFLAGS @SMPI_Fortran_FLAGS@
-list_set LINKARGS "-shared" "-lsimgrid" @SMPI_Fortran_LIBS@ "-lm"
+list_set LINKARGS "-lsimgrid" @SMPI_Fortran_LIBS@ "-lm"
+if [ "x${SMPI_PRETEND_CC}" = "x" ]; then
+   list_add LINKARGS "-shared"
+else
+   echo "Warning: smpiff pretends to be a regular compiler (SMPI_PRETEND_CC is set). Produced binaries will not be usable in SimGrid."
+fi
 list_set TMPFILES
 main_name=main