Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reduce code complexity.
[simgrid.git] / src / smpi / smpicxx.in
index c4af9cff9604f5ab02902f9a1efbf3913b9825f2..3610bb3ca4aece5ab09bfe7b775da698833f0007 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env sh
 
-# Copyright (c) 2014-2020. The SimGrid Team.
+# Copyright (c) 2014-2021. The SimGrid Team.
 # All rights reserved.
 
 # This program is free software; you can redistribute it and/or modify it
@@ -37,7 +37,7 @@ elif [ "x@APPLE@" = "x1" ]; then
        echo "Warning: smpicc pretends to be a regular compiler (SMPI_PRETEND_CC is set). Produced binaries will not be usable in SimGrid."
     fi
     if [ "x${SMPI_NO_UNDEFINED_CHECK}" = "x" ]; then
-      list_add LINKARGS "-lsimgrid" ${LINKER_UNDEFINED_ERROR:+"-Wl,-undefined,error"}
+      list_add LINKARGS "-lsimgrid" "-lm" ${LINKER_UNDEFINED_ERROR:+"-Wl,-undefined,error"}
     fi
 else
     list_add CXXFLAGS "-fPIC"
@@ -48,7 +48,7 @@ else
        echo "Warning: smpicc pretends to be a regular compiler (SMPI_PRETEND_CC is set). Produced binaries will not be usable in SimGrid."
     fi
     if [ "x${SMPI_NO_UNDEFINED_CHECK}" = "x" ]; then
-      list_add LINKARGS "-lsimgrid" ${LINKER_UNDEFINED_ERROR:+"-Wl,-z,defs"}
+      list_add LINKARGS "-lsimgrid" "-lm"  ${LINKER_UNDEFINED_ERROR:+"-Wl,-z,defs"}
     fi
 fi