Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
SMPI : Allow to deactivate link-time definitions check with an environment var
[simgrid.git] / src / smpi / smpicxx.in
index 4d7632b..2ef3b5e 100755 (executable)
@@ -36,7 +36,9 @@ elif [ "x@APPLE@" = "x1" ]; then
     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" ${LINKER_UNDEFINED_ERROR:+"-Wl,-undefined,error"}
+    if [ "x${SMPI_NO_UNDEFINED_CHECK}" = "x" ]; then
+      list_add LINKARGS "-lsimgrid" ${LINKER_UNDEFINED_ERROR:+"-Wl,-undefined,error"}
+    fi
 else
     list_add CXXFLAGS "-include" "@includedir@/smpi/smpi_helpers.h"
     list_add CXXFLAGS "-fPIC"
@@ -45,7 +47,9 @@ else
     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" ${LINKER_UNDEFINED_ERROR:+"-Wl,-z,defs"}
+    if [ "x${SMPI_NO_UNDEFINED_CHECK}" = "x" ]; then
+      list_add LINKARGS "-lsimgrid" ${LINKER_UNDEFINED_ERROR:+"-Wl,-z,defs"}
+    fi
 fi
 
 list_set CMDARGS