Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
attempt to fix en issue when timing functions are called before initialization
[simgrid.git] / src / smpi / smpicxx.in
index 859a84e..3610bb3 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
@@ -16,7 +16,7 @@ CMAKE_LINKARGS="-L@libdir@"
 
 @SMPITOOLS_SH@
 
-list_set CXXFLAGS "-std=gnu++14" @SMPI_CXX_FLAGS@
+list_set CXXFLAGS "-std=gnu++11" @SMPI_CXX_FLAGS@
 list_set LINKARGS
 
 if [ "@CMAKE_C_COMPILER_ID@" = "Clang" ] && [ "@HAVE_SANITIZER_ADDRESS@" = "TRUE" ]; then
@@ -26,29 +26,29 @@ else
 fi
 
 if [ "x@WIN32@" = "x1" ]; then
-    list_add CXXFLAGS "-include" "\"@includedir@/smpi/smpi_main.h\""
+    list_add CXXFLAGS "-include" "@includedir@/smpi/smpi_main.h"
     list_add LINKARGS "@libdir@\libsimgrid.dll"
 elif [ "x@APPLE@" = "x1" ]; then
     list_add CXXFLAGS "-fPIC"
     if [ "x${SMPI_PRETEND_CC}" = "x" ]; then
-       list_add CXXFLAGS "-include" "\"@includedir@/smpi/smpi_helpers.h\""
+       list_add CXXFLAGS "-include" "@includedir@/smpi/smpi_helpers.h"
        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
     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"
     if [ "x${SMPI_PRETEND_CC}" = "x" ]; then
-       list_add CXXFLAGS "-include" "\"@includedir@/smpi/smpi_helpers.h\""
+       list_add CXXFLAGS "-include" "@includedir@/smpi/smpi_helpers.h"
        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
     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
 
@@ -67,7 +67,7 @@ while [ $# -gt 0 ]; do
             if [ -z "$SRCFILE" ] ; then
                 SRCFILE="$ARG"
             fi
-            list_add CMDARGS "\"${SRCFILE}\""
+            list_add CMDARGS "${SRCFILE}"
             ;;
         '-version' | '--version')
             printf '%b\n' "$SIMGRID_VERSION"
@@ -102,4 +102,4 @@ if [ "x$VERBOSE" = x1 ] || [ "x$show" = x1 ] ; then
   echo "$@"
   [ "x$show" = x1 ] && exit 0
 fi
-eval "$@"
+"$@"