From: Martin Quinson Date: Fri, 30 Mar 2018 06:05:11 +0000 (+0200) Subject: be verbose when the SMPI_PRETEND_CC trick is activated X-Git-Tag: v3.20~582 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/20eb9ed9b0fd5895e40b0dac430e04ed8d6c49dc?hp=559da81e5a72b2dca56ccb686739650386b5b89e be verbose when the SMPI_PRETEND_CC trick is activated --- diff --git a/src/smpi/smpicc.in b/src/smpi/smpicc.in index bdac6008f4..fcafe88eee 100755 --- a/src/smpi/smpicc.in +++ b/src/smpi/smpicc.in @@ -25,12 +25,16 @@ elif [ "x@APPLE@" = "x1" ]; then list_add CFLAGS "-fpic" if [ "x${SMPI_PRETEND_CC}" = "x" ]; then list_add LINKARGS "-shared" + else + echo "Warning: smpicc pretends to be a regular compiler (SMPI_PRETEND_CC is set). Produced binaries will not be usable in SimGrid." fi list_add LINKARGS "-lsimgrid" "-Wl,-undefined,error" else list_add CFLAGS "-fpic" if [ "x${SMPI_PRETEND_CC}" = "x" ]; then list_add LINKARGS "-shared" + else + echo "Warning: smpicc pretends to be a regular compiler (SMPI_PRETEND_CC is set). Produced binaries will not be usable in SimGrid." fi list_add LINKARGS "-lsimgrid" "-Wl,-z,defs" fi diff --git a/src/smpi/smpicxx.in b/src/smpi/smpicxx.in index 241757c105..c5abb46832 100755 --- a/src/smpi/smpicxx.in +++ b/src/smpi/smpicxx.in @@ -23,6 +23,8 @@ if [ "@WIN32@" != "1" ]; then list_add CXXFLAGS "-fpic" "-std=gnu++11" if [ "x${SMPI_PRETEND_CC}" = "x" ]; then list_add LINKARGS "-shared" + else + echo "Warning: smpicxx pretends to be a regular compiler (SMPI_PRETEND_CC is set). Produced binaries will not be usable in SimGrid." fi list_add LINKARGS "-lsimgrid" "-std=gnu++11" else diff --git a/src/smpi/smpif90.in b/src/smpi/smpif90.in index 2100adb272..e64d68df87 100644 --- a/src/smpi/smpif90.in +++ b/src/smpi/smpif90.in @@ -16,9 +16,11 @@ CMAKE_LINKARGS="-L@libdir@" @SMPITOOLS_SH@ list_set FFLAGS @SMPI_Fortran_FLAGS@ - if [ "x${SMPI_PRETEND_CC}" = "x" ]; then - list_add LINKARGS "-shared" - fi +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 LINKARGS "-lsimgrid" @SMPI_Fortran_LIBS@ "-lm" list_set TMPFILES main_name=main diff --git a/src/smpi/smpiff.in b/src/smpi/smpiff.in index 210645d5e9..aaac339660 100644 --- a/src/smpi/smpiff.in +++ b/src/smpi/smpiff.in @@ -18,6 +18,8 @@ CMAKE_LINKARGS="-L@libdir@" list_set FFLAGS @SMPI_Fortran_FLAGS@ 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 LINKARGS "-lsimgrid" @SMPI_Fortran_LIBS@ "-lm" list_set TMPFILES