diff --git a/applications/utilities/mesh/generation/Allwmake b/applications/utilities/mesh/generation/Allwmake index 20a658ec8f978241f790dbe006473fc58ff71f69..f6f56de5d615e1acd331e77797734a286c810ab1 100755 --- a/applications/utilities/mesh/generation/Allwmake +++ b/applications/utilities/mesh/generation/Allwmake @@ -1,5 +1,11 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory + +# Get CGAL and boost versions +. $WM_PROJECT_DIR/etc/config.sh/functions +_foamEval SOURCE_CGAL_VERSIONS_ONLY=yes \ + $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL) + set -x wmake -all blockMesh @@ -7,7 +13,7 @@ wmake -all extrude wmake -all extrude2DMesh wmake -all snappyHexMesh -if [ -n "$CGAL_ARCH_PATH" ] +if [ -n "$CGAL_ARCH_PATH" -o "$cgal_version" = "cgal-system" ] then foamyMesh/Allwmake fi diff --git a/etc/config.sh/CGAL b/etc/config.sh/CGAL index c76aabe75e5b5dbc72e30a74562c378c01758612..4d0ca25ff636663c73b2dfc5415cd33648186a2d 100644 --- a/etc/config.sh/CGAL +++ b/etc/config.sh/CGAL @@ -27,6 +27,12 @@ # Description # Setup file for CGAL (& boost) include/libraries. # Sourced from OpenFOAM-<VERSION>/etc/bashrc +# +# If using system-wide installations for either one, use the following +# version settings: +# +# boost_version=boost-system +# cgal_version=cgal-system #------------------------------------------------------------------------------ boost_version=boost-system @@ -35,29 +41,29 @@ cgal_version=CGAL-4.7 if [ -z "$SOURCE_CGAL_VERSIONS_ONLY" ] then -common_path=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER + common_path=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER -export BOOST_ARCH_PATH=$common_path/$boost_version -export CGAL_ARCH_PATH=$common_path/$cgal_version + export BOOST_ARCH_PATH=$common_path/$boost_version + export CGAL_ARCH_PATH=$common_path/$cgal_version -if [ "$FOAM_VERBOSE" -a "$PS1" ] -then - echo "Using CGAL and boost" 1>&2 - echo " $cgal_version at $CGAL_ARCH_PATH" 1>&2 - echo " $boost_version at $BOOST_ARCH_PATH" 1>&2 -fi + if [ "$FOAM_VERBOSE" -a "$PS1" ] + then + echo "Using CGAL and boost" 1>&2 + echo " $cgal_version at $CGAL_ARCH_PATH" 1>&2 + echo " $boost_version at $BOOST_ARCH_PATH" 1>&2 + fi -if [ -d "$CGAL_ARCH_PATH" ] -then - _foamAddLib $CGAL_ARCH_PATH/lib -fi + if [ -d "$CGAL_ARCH_PATH" -a "$cgal_version" != "cgal-system" ] + then + _foamAddLib $CGAL_ARCH_PATH/lib + fi -if [ -d "$BOOST_ARCH_PATH" ] -then - _foamAddLib $BOOST_ARCH_PATH/lib -fi + if [ -d "$BOOST_ARCH_PATH" -a "$boost_version" != "boost-system" ] + then + _foamAddLib $BOOST_ARCH_PATH/lib + fi -unset boost_version cgal_version common_path + unset boost_version cgal_version common_path fi diff --git a/src/renumber/Allwmake b/src/renumber/Allwmake index 6cf33cff7029c2572df6232d2d9250a0790ef1b0..a44d239870bd4616d3a48019140425316d1b14cd 100755 --- a/src/renumber/Allwmake +++ b/src/renumber/Allwmake @@ -5,7 +5,12 @@ cd ${0%/*} || exit 1 # Run from this directory targetType=libso . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments -## get ZOLTAN_ARCH_PATH +# Get CGAL and scotch versions +. $WM_PROJECT_DIR/etc/config.sh/functions +_foamEval SOURCE_CGAL_VERSIONS_ONLY=yes \ + $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL) + +## Get ZOLTAN_ARCH_PATH #if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config.sh/zoltan` #then # . $settings @@ -21,7 +26,7 @@ set -x wmake $targetType renumberMethods -if [ -n "$BOOST_ARCH_PATH" ] +if [ -n "$BOOST_ARCH_PATH" -o "$boost_version" = "boost-system" ] then wmake $targetType SloanRenumber else