From 20eb9ed9b0fd5895e40b0dac430e04ed8d6c49dc Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Fri, 30 Mar 2018 08:05:11 +0200 Subject: [PATCH] be verbose when the SMPI_PRETEND_CC trick is activated --- src/smpi/smpicc.in | 4 ++++ src/smpi/smpicxx.in | 2 ++ src/smpi/smpif90.in | 8 +++++--- src/smpi/smpiff.in | 2 ++ 4 files changed, 13 insertions(+), 3 deletions(-) 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 -- 2.20.1