From 3a1113e51331bcf5cbd650d0deb93223f891f3fc Mon Sep 17 00:00:00 2001
From: Henry <Henry>
Date: Sat, 27 Oct 2012 21:34:40 +0100
Subject: [PATCH] Updated to avoid creating PINC and PLIBS environment
 variables

---
 etc/config/settings.csh | 12 +-----------
 etc/config/settings.sh  | 13 +------------
 2 files changed, 2 insertions(+), 23 deletions(-)

diff --git a/etc/config/settings.csh b/etc/config/settings.csh
index 069624f5137..059ea30e336 100644
--- a/etc/config/settings.csh
+++ b/etc/config/settings.csh
@@ -391,22 +391,12 @@ case SYSTEMOPENMPI:
     # Use the system installed openmpi, get library directory via mpicc
     setenv FOAM_MPI openmpi-system
 
-    # Set compilation flags here instead of in wmake/rules/../mplibSYSTEMOPENMPI
-    setenv PINC "`mpicc --showme:compile`"
-    setenv PLIBS "`mpicc --showme:link`"
-    set libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'`
+    set libDir=`mpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/'`
 
     # Bit of a hack: strip off 'lib' and hope this is the path to openmpi
     # include files and libraries.
     setenv MPI_ARCH_PATH "${libDir:h}"
 
-    if ($?FOAM_VERBOSE && $?prompt) then
-        echo "Using system installed MPI:"
-        echo "    compile flags : $PINC"
-        echo "    link flags    : $PLIBS"
-        echo "    libmpi dir    : $libDir"
-    endif
-
     _foamAddLib     $libDir
     unset libDir
     breaksw
diff --git a/etc/config/settings.sh b/etc/config/settings.sh
index 1fc2136530a..ed45429a650 100644
--- a/etc/config/settings.sh
+++ b/etc/config/settings.sh
@@ -418,23 +418,12 @@ SYSTEMOPENMPI)
     # Use the system installed openmpi, get library directory via mpicc
     export FOAM_MPI=openmpi-system
 
-    # Set compilation flags here instead of in wmake/rules/../mplibSYSTEMOPENMPI
-    export PINC="`mpicc --showme:compile`"
-    export PLIBS="`mpicc --showme:link`"
-    libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'`
+    libDir=`mpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/'`
 
     # Bit of a hack: strip off 'lib' and hope this is the path to openmpi
     # include files and libraries.
     export MPI_ARCH_PATH="${libDir%/*}"
 
-    if [ "$FOAM_VERBOSE" -a "$PS1" ]
-    then
-        echo "Using system installed MPI:" 1>&2
-        echo "    compile flags : $PINC" 1>&2
-        echo "    link flags    : $PLIBS" 1>&2
-        echo "    libmpi dir    : $libDir" 1>&2
-    fi
-
     _foamAddLib     $libDir
     unset libDir
     ;;
-- 
GitLab