X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/559da81e5a72b2dca56ccb686739650386b5b89e..8e6685471ba9c55bf3bdee4eefd6ba8c5bb6d86f:/src/smpi/smpif90.in diff --git a/src/smpi/smpif90.in b/src/smpi/smpif90.in index 2100adb272..a269cd8952 100644 --- a/src/smpi/smpif90.in +++ b/src/smpi/smpif90.in @@ -16,10 +16,12 @@ CMAKE_LINKARGS="-L@libdir@" @SMPITOOLS_SH@ list_set FFLAGS @SMPI_Fortran_FLAGS@ - if [ "x${SMPI_PRETEND_CC}" = "x" ]; then - list_add LINKARGS "-shared" - fi list_set LINKARGS "-lsimgrid" @SMPI_Fortran_LIBS@ "-lm" +if [ "x${SMPI_PRETEND_CC}" = "x" ]; then + list_add LINKARGS "-shared" +else + echo "Warning: smpif90 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 @@ -32,7 +34,7 @@ trap 'cleanup' EXIT filter_and_compile() { list_add TMPFILES "${TMPFILE}" #replace "program main_name by subroutine user\_main (and the end clause as well)" - sed 's/[[:space:]]*[pP][rR][oO][gG][rR][aA][mM][[:space:]]*\([a-zA-Z0-9\-\_]*\)/ subroutine user\_main /g' "${ARG}" > "${TMPFILE}" + sed 's/[[:space:]]*[pP][rR][oO][gG][rR][aA][mM][[:space:]][[:space:]]*\([a-zA-Z0-9\-\_]*\)/ subroutine user\_main /g' "${ARG}" > "${TMPFILE}" SRCFILE="${TMPFILE}" list_add CMDLINE "${SRCFILE}" }