Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add version notes to smpiXXX scripts
authorscastelli <stephane.castelli@inria.fr>
Wed, 4 Jun 2014 18:14:44 +0000 (20:14 +0200)
committerscastelli <stephane.castelli@inria.fr>
Wed, 4 Jun 2014 18:14:44 +0000 (20:14 +0200)
src/smpi/smpicc.in
src/smpi/smpicxx.in
src/smpi/smpif90.in
src/smpi/smpiff.in
src/smpi/smpirun.in

index d18e0f1..db70796 100755 (executable)
@@ -6,6 +6,8 @@
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the license (GNU LGPL) which comes with this package.
 
+SIMGRID_VERSION="@SIMGRID_VERSION_STRING@"
+
 CC=@CMAKE_C_COMPILER@
 
 INCLUDEARGS="@includeflag@"
@@ -40,10 +42,15 @@ while [ $# -gt 0 ]; do
             fi
             list_add CMDARGS "${SRCFILE}"
             ;;
+        '-version' | '--version' | '-v')
+            # -e is not recognised by MS-DOS...
+            echo -e $SIMGRID_VERSION
+            exit 0
+            ;;           
         *)
             list_add CMDARGS "${ARG}"
-      ;;
-  esac
+            ;;
+    esac
 done
 
 list_set CMDLINE "${CC}"
index 1f2cb32..7026936 100755 (executable)
@@ -6,20 +6,22 @@
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the license (GNU LGPL) which comes with this package.
 
-CC=@CMAKE_CXX_COMPILER@
+SIMGRID_VERSION="@SIMGRID_VERSION_STRING@"
+
+CXX=@CMAKE_CXX_COMPILER@
 
 INCLUDEARGS="@includeflag@"
 CMAKE_LINKARGS="-L@libdir@"
 
 @SMPITOOLS_SH@
 
-list_set CFLAGS
+list_set CXXFLAGS
 list_set LINKARGS
 if [ "@WIN32@" != "1" ]; then
-    list_add CFLAGS "-Dmain=smpi_simulated_main_"
+    list_add CXXFLAGS "-Dmain=smpi_simulated_main_"
     list_add LINKARGS "-lsimgrid"
 else
-    list_add CFLAGS "-include" "@includedir@/smpi/smpi_main.h"
+    list_add CXXFLAGS "-include" "@includedir@/smpi/smpi_main.h"
     list_add LINKARGS "@libdir@\libsimgrid.dll"
 fi
 
@@ -40,14 +42,18 @@ while [ $# -gt 0 ]; do
             fi
             list_add CMDARGS "${SRCFILE}"
             ;;
+        "-version" | "--version" | "-v")
+            echo -e $SIMGRID_VERSION
+            exit 0
+            ;;
         *)
             list_add CMDARGS "${ARG}"
       ;;
   esac
 done
 
-list_set CMDLINE "${CC}"
-list_add_not_empty CMDLINE "${CFLAGS}"
+list_set CMDLINE "${CXX}"
+list_add_not_empty CMDLINE "${CXXFLAGS}"
 list_add_not_empty CMDLINE ${INCLUDEARGS}
 list_add_not_empty CMDLINE ${CMAKE_LINKARGS}
 list_add_not_empty CMDLINE "${CMDARGS}"
index 9e30ca3..23e16ad 100644 (file)
@@ -6,6 +6,8 @@
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the license (GNU LGPL) which comes with this package.
 
+SIMGRID_VERSION="@SIMGRID_VERSION_STRING@"
+
 F90=@GFORTRAN_EXE@
 
 INCLUDEARGS="@includeflag@"
@@ -43,6 +45,11 @@ while [ $# -gt 0 ]; do
             SRCFILE="${TMPFILE}"
             list_add CMDLINE "${SRCFILE}"
             ;;
+        '-version' | '--version' | '-v')
+            # -e is not recognised by MS-DOS...
+            echo -e $SIMGRID_VERSION
+            exit 0
+            ;;           
         *)
             list_add CMDLINE "${ARG}"
             ;;
index 13955eb..be2b2f4 100644 (file)
@@ -6,6 +6,8 @@
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the license (GNU LGPL) which comes with this package.
 
+SIMGRID_VERSION="@SIMGRID_VERSION_STRING@"
+
 prefix="@exec_prefix@"
 smpicc="$prefix/bin/smpicc"
 smpif2c="$prefix/bin/smpif2c"
@@ -27,6 +29,11 @@ while [ $# -gt 0 ]; do
             fi
             list_add SRCFILES "${SRCFILE}"
             ;;
+        '-version' | '--version' | '-v')
+            # -e is not recognised by MS-DOS...
+            echo -e $SIMGRID_VERSION
+            exit 0
+            ;;           
         *)
             if [ "${ARG}" = "-c" ]; then
                 LINKARGS=""
index 2cd37fc..7f1407b 100755 (executable)
@@ -8,6 +8,8 @@
 
 @CMAKE_SMPI_COMMAND@
 
+SIMGRID_VERSION="@SIMGRID_VERSION_STRING@"
+
 DEFAULT_LOOPBACK_BANDWIDTH="498000000"
 DEFAULT_LOOPBACK_LATENCY="0.000004"
 DEFAULT_NETWORK_BANDWIDTH="$((26 * 1024 * 1024))"
@@ -163,7 +165,12 @@ while true; do
 
         "-help" | "--help" | "-h")
             usage
-            exit
+            exit 0
+            ;;
+
+        "-version" | "--version" | "-v")
+            echo -e $SIMGRID_VERSION
+            exit 0
             ;;
 
         "--cfg="*|"--log="*)