Commit 45198c58 authored by mattijs's avatar mattijs
Browse files

Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop

parents 5c673119 b2234f19
......@@ -71,9 +71,6 @@ case ThirdParty:
set gcc_version=gcc-6.1.0
breaksw
case Clang:
# Using clang - not gcc
setenv WM_CC 'clang'
setenv WM_CXX 'clang++'
set clang_version=llvm-3.7.0
# set clang_version=llvm-3.8.0
breaksw
......@@ -87,4 +84,13 @@ case ThirdParty:
endsw
endsw
# common settings (system or ThirdParty)
switch ("$WM_COMPILER")
case Clang:
# Using clang - not gcc
setenv WM_CC 'clang'
setenv WM_CXX 'clang++'
breaksw
endsw
#------------------------------------------------------------------------------
......@@ -253,26 +253,21 @@ case ThirdParty:
# Add ThirdParty gmp/mpfr/mpc libraries to run-time environment
if ( "${gmpDir:t}" != "gmp-system" ) then
_foamAddLib $gmpDir/lib$WM_COMPILER_LIB_ARCH
setenv GMP_ARCH_PATH $gmpDir # For ThirdParty CGAL
endif
if ( "${mpfrDir:t}" != "mpfr-system" ) then
_foamAddLib $mpfrDir/lib$WM_COMPILER_LIB_ARCH
setenv MPFR_ARCH_PATH $mpfrDir # For ThirdParty CGAL
endif
if ( "${mpcDir:t}" != "mpc-system" ) then
_foamAddLib $mpcDir/lib$WM_COMPILER_LIB_ARCH
endif
# Used by boost/CGAL:
setenv GMP_ARCH_PATH $gmpDir
setenv MPFR_ARCH_PATH $mpfrDir
if ($?FOAM_VERBOSE && $?prompt) then
echo "Using ThirdParty compiler"
echo " ${gccDir:t} (${gmpDir:t} ${mpfrDir:t} ${mpcDir:t})"
endif
endif
unset gcc_version gccDir
unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir
if ( $?clang_version ) then
set clangDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$clang_version
......@@ -295,6 +290,9 @@ case ThirdParty:
echo " ${clangDir:t}"
endif
endif
unset gcc_version gccDir
unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir
unset clang_version clangDir
breaksw
......@@ -308,6 +306,5 @@ endsw
# Cleanup environment:
# ~~~~~~~~~~~~~~~~~~~~
#- keep _foamAddPath _foamAddLib _foamAddMan
unsetenv WM_COMPILER_TYPE
#------------------------------------------------------------------------------
......@@ -64,6 +64,7 @@ unsetenv WM_ARCH_OPTION
unsetenv WM_CC
unsetenv WM_CFLAGS
unsetenv WM_COMPILER
unsetenv WM_COMPILER_ARCH
unsetenv WM_COMPILER_LIB_ARCH
unsetenv WM_COMPILE_OPTION
unsetenv WM_CXX
......@@ -128,6 +129,16 @@ unsetenv ParaView_DIR
unsetenv ParaView_INCLUDE_DIR
unsetenv PV_PLUGIN_PATH
#------------------------------------------------------------------------------
# unset other ThirdParty environment variables
unsetenv BOOST_ARCH_PATH
unsetenv CCMIO_ARCH_PATH
unsetenv CGAL_ARCH_PATH
unsetenv FFTW_ARCH_PATH
unsetenv GMP_ARCH_PATH
unsetenv MPFR_ARCH_PATH
unsetenv SCOTCH_ARCH_PATH
#------------------------------------------------------------------------------
# cleanup environment
......
......@@ -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
#------------------------------------------------------------------------------
......@@ -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
;;
*)
......
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment