From 6703d49f94cc79091b40ee2ef294a14c53986c14 Mon Sep 17 00:00:00 2001 From: Henry Weller <http://cfd.direct> Date: Fri, 1 Jul 2016 17:01:26 +0100 Subject: [PATCH] etc/config.sh/CGAL: unset CGAL_ARCH_PATH if it is no longer needed --- etc/config.sh/CGAL | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/etc/config.sh/CGAL b/etc/config.sh/CGAL index 6a942592239..62c314cb601 100644 --- a/etc/config.sh/CGAL +++ b/etc/config.sh/CGAL @@ -25,11 +25,10 @@ # etc/config.sh/CGAL # # Description -# Setup file for CGAL (& boost) include/libraries. +# Configuration file for BOOST and CGAL include/libraries. # Sourced from OpenFOAM-<VERSION>/etc/bashrc # -# If using system-wide installations for either one, use the following -# version settings: +# If using system-wide installations use the following version settings: # # boost_version=boost-system # cgal_version=cgal-system @@ -42,16 +41,26 @@ cgal_version=cgal-system thirdPartyPath=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER -if [ "$boost_version" != "boost-system" -a -d "$thirdPartyPath/$boost_version" ] +if [ "$boost_version" != "boost-system" ] then export BOOST_ARCH_PATH=$thirdPartyPath/$boost_version - _foamAddLib $BOOST_ARCH_PATH/lib + if [ -d "$BOOST_ARCH_PATH" ] + then + _foamAddLib $BOOST_ARCH_PATH/lib + fi +else + unset BOOST_ARCH_PATH fi -if [ "$cgal_version" != "cgal-system" -a -d "$thirdPartyPath/$cgal_version" ] +if [ "$cgal_version" != "cgal-system" ] then export CGAL_ARCH_PATH=$thirdPartyPath/$cgal_version - _foamAddLib $CGAL_ARCH_PATH/lib + if [ -d "$CGAL_ARCH_PATH" ] + then + _foamAddLib $CGAL_ARCH_PATH/lib + fi +else + unset CGAL_ARCH_PATH fi if [ "$FOAM_VERBOSE" -a "$PS1" ] -- GitLab