BUG: could not set system clang (issue #166)

- gcc/g++ always being used

STYLE: spurious unsetenv WM_COMPILER_TYPE (csh only)

- more stringent cleanup of ThirdParty settings for wmUNSET
This commit is contained in:
Mark Olesen
2016-06-29 16:06:48 +02:00
parent 5de8c1538f
commit b2234f19e5
6 changed files with 49 additions and 20 deletions

View File

@ -69,9 +69,6 @@ OpenFOAM | ThirdParty)
gcc_version=gcc-6.1.0
;;
Clang)
# Using clang - not gcc
export WM_CC='clang'
export WM_CXX='clang++'
clang_version=llvm-3.7.0
# clang_version=llvm-3.8.0
;;
@ -84,7 +81,15 @@ OpenFOAM | ThirdParty)
;;
esac
;;
esac
# common settings (system or ThirdParty)
case "$WM_COMPILER" in
Clang)
# Using clang - not gcc
export WM_CC='clang'
export WM_CXX='clang++'
;;
esac
#------------------------------------------------------------------------------

View File

@ -246,28 +246,24 @@ OpenFOAM | ThirdParty)
if [ "${gmpDir##*-}" != system ]
then
_foamAddLib $gmpDir/lib$WM_COMPILER_LIB_ARCH
export GMP_ARCH_PATH=$gmpDir # For ThirdParty CGAL
fi
if [ "${mpfrDir##*-}" != system ]
then
_foamAddLib $mpfrDir/lib$WM_COMPILER_LIB_ARCH
export MPFR_ARCH_PATH=$mpfrDir # For ThirdParty CGAL
fi
if [ "${mpcDir##*-}" != system ]
then
_foamAddLib $mpcDir/lib$WM_COMPILER_LIB_ARCH
fi
# Used by boost/CGAL:
export GMP_ARCH_PATH=$gmpDir
export MPFR_ARCH_PATH=$mpfrDir
if [ "$FOAM_VERBOSE" -a "$PS1" ]
then
echo "Using ThirdParty compiler"
echo " ${gccDir##*/} (${gmpDir##*/} $${mpfrDir##*/} ${mpcDir##*/})"
fi
fi
unset gcc_version gccDir
unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir
if [ -n "$clang_version" ]
then
@ -293,6 +289,9 @@ OpenFOAM | ThirdParty)
echo " ${clangDir##*/}"
fi
fi
unset gcc_version gccDir
unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir
unset clang_version clangDir
;;
*)

View File

@ -51,6 +51,7 @@ unset WM_ARCH_OPTION
unset WM_CC
unset WM_CFLAGS
unset WM_COMPILER
unset WM_COMPILER_ARCH
unset WM_COMPILER_LIB_ARCH
unset WM_COMPILE_OPTION
unset WM_CXX
@ -115,6 +116,16 @@ unset ParaView_DIR
unset ParaView_INCLUDE_DIR
unset PV_PLUGIN_PATH
#------------------------------------------------------------------------------
# unset other ThirdParty environment variables
unset BOOST_ARCH_PATH
unset CCMIO_ARCH_PATH
unset CGAL_ARCH_PATH
unset FFTW_ARCH_PATH
unset GMP_ARCH_PATH
unset MPFR_ARCH_PATH
unset SCOTCH_ARCH_PATH
#------------------------------------------------------------------------------
# cleanup environment