From 756ad11d5e98fcf0d7288b97b739f209852790e4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Castelli?= Date: Fri, 27 Jun 2014 10:51:33 +0200 Subject: [PATCH] Add an option to get the compiler version, change the manpages accordingly --- doc/manpage/smpicc.1 | 4 ++-- doc/manpage/smpicxx.1 | 4 ++-- doc/manpage/smpif90.1 | 6 +++--- doc/manpage/smpiff.1 | 4 ++-- src/smpi/smpicc.in | 7 +++++-- src/smpi/smpicxx.in | 5 ++++- src/smpi/smpif90.in | 7 +++++-- src/smpi/smpiff.in | 5 ++++- 8 files changed, 27 insertions(+), 15 deletions(-) diff --git a/doc/manpage/smpicc.1 b/doc/manpage/smpicc.1 index b7debd8d03..5ba493dea6 100644 --- a/doc/manpage/smpicc.1 +++ b/doc/manpage/smpicc.1 @@ -4,9 +4,9 @@ smpicc \- SMPI C wrapper compiler .SH SYNOPSIS smpicc … .SH DESCRIPTION -smpicc is just a wrapper around the C compiler used to build simgrid, adding the right flags in order to use the simgrid library and SMPI, the MPI implementation within it. Any arguments filled to smpicc will be passed to the underlying compiler directly, of which the \fB\-\-version\fR argument should give the name and the version. Please refer to its documentation in case of trouble. +smpicc is a wrapper around the C compiler defined when building SimGrid, adding the right flags in order to use the SimGrid library and SMPI, the MPI implementation within it. Most of the arguments filled to smpicc will be passed to the underlying compiler directly, except for \fB\-\-version\fR which gives the SimGrid library version, and \fB\-\-compiler-version\fR which gives the C compiler version. Please refer to the latter documentation in case of trouble. .SH ENVIRONMENT VARIABLES -All environment variables taken into account by the underlying compiler will be used, but note that the compiler can not be modified. +All environment variables taken into account by the underlying compiler will be used by it, but note that the compiler can not be modified. .SH AUTHORS The SimGrid team (simgrid-devel@lists.gforge.inria.fr) .SH COPYRIGHT AND LICENCE diff --git a/doc/manpage/smpicxx.1 b/doc/manpage/smpicxx.1 index b8414cc7ae..68d2cf39ff 100644 --- a/doc/manpage/smpicxx.1 +++ b/doc/manpage/smpicxx.1 @@ -4,9 +4,9 @@ smpicxx \- SMPI C++ wrapper compiler .SH SYNOPSIS smpicxx … .SH DESCRIPTION -smpicxx is just a wrapper around the C++ compiler used to build simgrid, adding the right flags in order to use the simgrid library and SMPI, the MPI implementation within it. Any arguments filled to smpicxx will be passed to the underlying compiler directly, of which the \fB\-\-version\fR argument should give the name and the version. Please refer to its documentation in case of trouble. +smpicxx is a wrapper around the C++ compiler defined when building SimGrid, adding the right flags in order to use the SimGrid library and SMPI, the MPI implementation within it. Most of the arguments filled to smpicxx will be passed to the underlying compiler directly, except for \fB\-\-version\fR which gives the SimGrid library version, and \fB\-\-compiler-version\fR which gives the C++ compiler version. Please refer to the latter documentation in case of trouble. .SH ENVIRONMENT VARIABLES -All environment variables taken into account by the underlying compiler will be used, but note that the compiler can not be modified. +All environment variables taken into account by the underlying compiler will be used by it, but note that the compiler can not be modified. .SH AUTHORS The SimGrid team (simgrid-devel@lists.gforge.inria.fr) .SH COPYRIGHT AND LICENCE diff --git a/doc/manpage/smpif90.1 b/doc/manpage/smpif90.1 index 271073ca59..8bfda6625a 100644 --- a/doc/manpage/smpif90.1 +++ b/doc/manpage/smpif90.1 @@ -1,12 +1,12 @@ .TH smpif90 1 .SH NAME -smpif90 \- SMPI fortran 90 wrapper compiler +smpif90 \- SMPI Fortran 90 wrapper compiler .SH SYNOPSIS smpif90 … .SH DESCRIPTION -smpif90 is just a wrapper around the Fortran 90 compiler used when building simgrid, adding the right flags in order to use the simgrid library and SMPI, the MPI implementation within it. Any arguments filled to smpiff will be passed to the underlying compiler directly, of which the \fB\-\-version\fR argument should give the name and the version. Please refer to its documentation in case of trouble. +smpif90 is a wrapper around the Fortran 90 compiler defined when building SimGrid, adding the right flags in order to use the SimGrid library and SMPI, the MPI implementation within it. Most of the arguments filled to smpif90 will be passed to the underlying compiler directly, except for \fB\-\-version\fR which gives the SimGrid library version, and \fB\-\-compiler-version\fR which gives the F90 compiler version. Please refer to the latter documentation in case of trouble. .SH ENVIRONMENT VARIABLES -All environment variables taken into account by the underlying compiler will be used, but note that the compiler can not be modified. +All environment variables taken into account by the underlying compiler will be used by it, but note that the compiler can not be modified. .SH AUTHORS The SimGrid team (simgrid-devel@lists.gforge.inria.fr) .SH COPYRIGHT AND LICENCE diff --git a/doc/manpage/smpiff.1 b/doc/manpage/smpiff.1 index 90f35eabc0..9f6a3a82da 100644 --- a/doc/manpage/smpiff.1 +++ b/doc/manpage/smpiff.1 @@ -1,10 +1,10 @@ .TH smpiff 1 .SH NAME -smpiff \- SMPI fortran 77 wrapper compiler +smpiff \- SMPI Fortran 77 wrapper compiler .SH SYNOPSIS smpiff … .SH DESCRIPTION -smpiff is just a wrapper around the Fortran 77 compiler used when building simgrid, adding the right flags in order to use the simgrid library and SMPI, the MPI implementation within it. Any arguments filled to smpiff will be passed to the underlying compiler directly, of which the \fB\-\-version\fR argument should give the name and the version. Please refer to its documentation in case of trouble. +smpiff is a wrapper around the Fortran 77 compiler defined when building SimGrid, adding the right flags in order to use the SimGrid library and SMPI, the MPI implementation within it. Most of the arguments filled to smpiff will be passed to the underlying compiler directly, except for \fB\-\-version\fR which gives the SimGrid library version, and \fB\-\-compiler-version\fR which gives the F77 compiler version. Please refer to the latter documentation in case of trouble. .SH ENVIRONMENT VARIABLES All environment variables taken into account by the underlying compiler will be used, but note that the compiler can not be modified. .SH AUTHORS diff --git a/src/smpi/smpicc.in b/src/smpi/smpicc.in index 0d505971de..6902a25e2f 100755 --- a/src/smpi/smpicc.in +++ b/src/smpi/smpicc.in @@ -42,10 +42,13 @@ while [ $# -gt 0 ]; do fi list_add CMDARGS "${SRCFILE}" ;; - '-version' | '--version' | '-v') + '-version' | '--version') printf '%b\n' "$SIMGRID_VERSION" exit 0 - ;; + ;; + '-compiler-version' | '--compiler-version') + ${CC} --version + ;; *) list_add CMDARGS "${ARG}" ;; diff --git a/src/smpi/smpicxx.in b/src/smpi/smpicxx.in index 5bd4b1ae39..b23a2740ff 100755 --- a/src/smpi/smpicxx.in +++ b/src/smpi/smpicxx.in @@ -42,10 +42,13 @@ while [ $# -gt 0 ]; do fi list_add CMDARGS "${SRCFILE}" ;; - "-version" | "--version" | "-v") + '-version' | '--version') printf '%b\n' "$SIMGRID_VERSION" exit 0 ;; + '-compiler-version' | '--compiler-version') + ${CXX} --version + ;; *) list_add CMDARGS "${ARG}" ;; diff --git a/src/smpi/smpif90.in b/src/smpi/smpif90.in index 0be13cee5b..1a33ba1430 100644 --- a/src/smpi/smpif90.in +++ b/src/smpi/smpif90.in @@ -45,10 +45,13 @@ while [ $# -gt 0 ]; do SRCFILE="${TMPFILE}" list_add CMDLINE "${SRCFILE}" ;; - '-version' | '--version' | '-v') + '-version' | '--version') printf '%b\n' "$SIMGRID_VERSION" exit 0 - ;; + ;; + '-compiler-version' | '--compiler-version') + ${F90} --version + ;; *) list_add CMDLINE "${ARG}" ;; diff --git a/src/smpi/smpiff.in b/src/smpi/smpiff.in index 8bb046e169..1c6308dfc6 100644 --- a/src/smpi/smpiff.in +++ b/src/smpi/smpiff.in @@ -49,10 +49,13 @@ while [ $# -gt 0 ]; do SRCFILE="${TMPFILE}" list_add CMDLINE "${SRCFILE}" ;; - '-version' | '--version' | '-v') + '-version' | '--version') printf '%b\n' "$SIMGRID_VERSION" exit 0 ;; + '-compiler-version' | '--compiler-version') + ${F77} --version + ;; -o) NEEDS_OUTPUT=0 list_add CMDLINE "-o" -- 2.20.1