diff --git a/applications/utilities/mesh/generation/Allwmake b/applications/utilities/mesh/generation/Allwmake index 2211a8c0b90a7548db68dd7dcc44a61c3e76b9a4..d4b3015ba78ca9c77fa73e1c6dca996668847af1 100755 --- a/applications/utilities/mesh/generation/Allwmake +++ b/applications/utilities/mesh/generation/Allwmake @@ -3,12 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory # Parse arguments for compilation (at least for error catching) . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments - -# 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 @@ -16,10 +10,6 @@ wmake -all extrude wmake -all extrude2DMesh wmake -all snappyHexMesh -if [ -n "$CGAL_ARCH_PATH" -o "$cgal_version" = "cgal-system" ] -then - foamyMesh/Allwmake $* -fi - +foamyMesh/Allwmake $* #------------------------------------------------------------------------------ diff --git a/applications/utilities/mesh/generation/foamyMesh/Allwmake b/applications/utilities/mesh/generation/foamyMesh/Allwmake index 17241fde089720f1a8e2f71068ad90fa37c879c5..9faba8d9bfc2ce70e2aa363e81fd4ddacf8f4cf6 100755 --- a/applications/utilities/mesh/generation/foamyMesh/Allwmake +++ b/applications/utilities/mesh/generation/foamyMesh/Allwmake @@ -4,15 +4,21 @@ cd ${0%/*} || exit 1 # Run from this directory # Parse arguments for library compilation targetType=libso . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments -set -x -wmake $targetType conformalVoronoiMesh -wmake $targetType conformalVoronoi2DMesh -wmake foamyQuadMesh -wmake foamyHexMesh -#wmake foamyHexMeshBackgroundMesh -#(cd foamyHexMeshSurfaceSimplify && ./Allwmake) -#wmake cellSizeAndAlignmentGrid +if [ -d "$CGAL_ARCH_PATH/include/CGAL" ] || \ + [ "${CGAL_ARCH_PATH##*-}" = system -a -d /usr/include/CGAL ] +then + set -x + wmake $targetType conformalVoronoiMesh + wmake $targetType conformalVoronoi2DMesh + wmake foamyQuadMesh + wmake foamyHexMesh + # wmake foamyHexMeshBackgroundMesh + # (cd foamyHexMeshSurfaceSimplify && ./Allwmake) + # wmake cellSizeAndAlignmentGrid +else + echo "WARNING: cannot build ${PWD##*/} without CGAL" +fi #------------------------------------------------------------------------------ diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake b/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake index 049c1bfca0e34f3d2fd475222458c9ad88106dbb..b34e11bf4b66bf5c601e174dd18c639ba4017328 100755 --- a/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake +++ b/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake @@ -1,32 +1,66 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory +# Optional unit: continue-on-error +export WM_CONTINUE_ON_ERROR=true + # Parse arguments for library compilation targetType=libso . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments + +# +# There are several prerequisites for building a plugin +# #set -x +canBuildPlugin() +{ + [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] || { + echo + echo "WARNING: cannot build ParaView plugin(s) without paraview directory" + echo " ParaView_DIR=$ParaView_DIR" + echo + return 1 + } + + [ -n "$PV_PLUGIN_PATH" ] || { + echo + echo "${PWD##*/} : invalid PV_PLUGIN_PATH for building ParaView plugin(s)" + echo " PV_PLUGIN_PATH=${PV_PLUGIN_PATH:-unset}" + echo + return 1 + } + + type cmake > /dev/null 2>&1 || { + echo + echo "WARNING: cannot build ParaView plugin(s) without cmake" + echo + return 1 + } + return 0 # success +} + + +# ----------------------------------------------------------------------------- case "$ParaView_VERSION" in 3*) - if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] + if canBuildPlugin then - [ -n "$PV_PLUGIN_PATH" ] || { - echo "$0 : PV_PLUGIN_PATH not valid - it is unset" - exit 1 - } - - # ensure CMake gets the correct C++ compiler + ( + # C++ compiler for CMake [ -n "$WM_CXX" ] && export CXX="$WM_CXX" wmake $targetType vtkPV3Readers PV3blockMeshReader/Allwmake $* PV3FoamReader/Allwmake $* - else - echo "ERROR: ParaView not found in $ParaView_DIR" + ) fi ;; *) - echo "WARN: PV3 readers not building: ParaView_VERSION=$ParaView_VERSION" + echo + echo "NOTE: skipping build of ParaView V3 plugin(s)" + echo " different version: ParaView_VERSION=$ParaView_VERSION" + echo ;; esac diff --git a/applications/utilities/postProcessing/graphics/PVReaders/Allwmake b/applications/utilities/postProcessing/graphics/PVReaders/Allwmake index edaa31a37b0f0220cb1da079cf87b7c37a74e51f..06809755604aa29f6f1ba72707537c13453db7f6 100755 --- a/applications/utilities/postProcessing/graphics/PVReaders/Allwmake +++ b/applications/utilities/postProcessing/graphics/PVReaders/Allwmake @@ -1,32 +1,66 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory +# Optional unit: continue-on-error +export WM_CONTINUE_ON_ERROR=true + # Parse arguments for library compilation targetType=libso . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments + +# +# There are several prerequisites for building a plugin +# #set -x +canBuildPlugin() +{ + [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] || { + echo + echo "WARNING: cannot build ParaView plugin(s) without paraview directory" + echo " ParaView_DIR=$ParaView_DIR" + echo + return 1 + } + + [ -n "$PV_PLUGIN_PATH" ] || { + echo + echo "${PWD##*/} : invalid PV_PLUGIN_PATH for building ParaView plugin(s)" + echo " PV_PLUGIN_PATH=${PV_PLUGIN_PATH:-unset}" + echo + return 1 + } + + type cmake > /dev/null 2>&1 || { + echo + echo "WARNING: cannot build ParaView plugin(s) without cmake" + echo + return 1 + } + return 0 # success +} + + +# ----------------------------------------------------------------------------- case "$ParaView_VERSION" in 4* | 5*) - if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] + if canBuildPlugin then - [ -n "$PV_PLUGIN_PATH" ] || { - echo "$0 : PV_PLUGIN_PATH not valid - it is unset" - exit 1 - } - - # ensure CMake gets the correct C++ compiler + ( + # C++ compiler for CMake [ -n "$WM_CXX" ] && export CXX="$WM_CXX" wmake $targetType vtkPVReaders PVblockMeshReader/Allwmake $* PVFoamReader/Allwmake $* - else - echo "ERROR: ParaView not found in $ParaView_DIR" + ) fi ;; *) - echo "WARN: PV readers not building: ParaView_VERSION=$ParaView_VERSION" + echo + echo "NOTE: skipping build of ParaView plugin(s)" + echo " different version: ParaView_VERSION=$ParaView_VERSION" + echo ;; esac diff --git a/applications/utilities/surface/surfaceBooleanFeatures/Allwmake b/applications/utilities/surface/surfaceBooleanFeatures/Allwmake index 50d640f2b259e90e7b898ee8e01761780709b6e6..98d3d2035c07f8b2ae3ffe6dd6e4169edc4a4a4c 100755 --- a/applications/utilities/surface/surfaceBooleanFeatures/Allwmake +++ b/applications/utilities/surface/surfaceBooleanFeatures/Allwmake @@ -2,14 +2,18 @@ cd ${0%/*} || exit 1 # Run from this directory set -x -if [ -z "$CGAL_ARCH_PATH" ] +unset COMPILE_FLAGS LINK_FLAGS + +if [ -d "$CGAL_ARCH_PATH/include/CGAL" ] || \ + [ "${CGAL_ARCH_PATH##*-}" = system -a -d /usr/include/CGAL ] then - export COMPILE_FLAGS="-DNO_CGAL" -else wmake PolyhedronReader export COMPILE_FLAGS='-IPolyhedronReader' export LINK_FLAGS='${CGAL_LIBS} -lPolyhedronReader' +else + export COMPILE_FLAGS="-DNO_CGAL" fi + wmake # ----------------------------------------------------------------- end-of-file diff --git a/applications/utilities/surface/surfaceBooleanFeatures/Make/options b/applications/utilities/surface/surfaceBooleanFeatures/Make/options index ed05fef039a9070d0287ea2f6c2167acbc15427f..873db3134acb6e2555bb50f67e0ef45e2f491b3d 100644 --- a/applications/utilities/surface/surfaceBooleanFeatures/Make/options +++ b/applications/utilities/surface/surfaceBooleanFeatures/Make/options @@ -15,7 +15,6 @@ EXE_INC = \ ${CGAL_INC} \ ${c++CGALWARN} \ $(COMPILE_FLAGS) \ - -IPolyhedronReader \ -I$(FOAM_SRC)/surfMesh/lnInclude \ -I$(FOAM_SRC)/triSurface/lnInclude \ -I$(LIB_SRC)/edgeMesh/lnInclude \ diff --git a/etc/config.csh/CGAL b/etc/config.csh/CGAL index 14304f46a4d4b5b254f475f350c0c859594c989c..a0fad016ba88134930704cd296f23fe8e5a06da5 100644 --- a/etc/config.csh/CGAL +++ b/etc/config.csh/CGAL @@ -22,12 +22,27 @@ # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # # File -# config.csh/CGAL +# etc/config.csh/CGAL # # Description # Setup file for CGAL (& boost) include/libraries. # Sourced from OpenFOAM-<VERSION>/etc/cshrc -##------------------------------------------------------------------------------ +# +# If using system-wide installations, use the following settings: +# +# boost_version=boost-system +# cgal_version=cgal-system +# +# If using a central installation: +# - specify boost-system / cgal-system +# - provide full paths for BOOST_ARCH_PATH / CGAL_ARCH_PATH +# +# Note +# When building OpenFOAM, any changes made here MUST be made in the +# equivalent config.sh version too, since that is the one which will +# be used during the build process. +# +#------------------------------------------------------------------------------ set boost_version=boost-system set cgal_version=CGAL-4.8 diff --git a/etc/config.sh/CGAL b/etc/config.sh/CGAL index 654140addd7f51c493f80646ad75bb2f74b088d7..119858485a3fddf25c6091f52ebe983099c5f6e6 100644 --- a/etc/config.sh/CGAL +++ b/etc/config.sh/CGAL @@ -28,11 +28,15 @@ # 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: +# If using system-wide installations, use the following settings: # # boost_version=boost-system # cgal_version=cgal-system +# +# If using a central installation: +# - specify boost-system / cgal-system +# - provide full paths for BOOST_ARCH_PATH / CGAL_ARCH_PATH +# #------------------------------------------------------------------------------ boost_version=boost-system diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/Allwclean b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/Allwclean index b570283bce32175fee1a3aaa778128a115bf1cd3..4cee715d32a3f7265fc7259b8352731c1c251066 100755 --- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/Allwclean +++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/Allwclean @@ -7,6 +7,5 @@ cd ${0%/*} || exit 1 # Run from this directory ( # Where are the generated files stored? findObjectDir dummy.C - depDir="$objectsDir" - rm -rf "$depDir" > /dev/null 2>&1 + rm -rf "$objectsDir" > /dev/null 2>&1 ) diff --git a/src/renumber/Allwmake b/src/renumber/Allwmake index a44d239870bd4616d3a48019140425316d1b14cd..14191c9526787f66f030515498760be4613ae226 100755 --- a/src/renumber/Allwmake +++ b/src/renumber/Allwmake @@ -5,11 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory targetType=libso . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments -# 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 @@ -21,22 +16,21 @@ _foamEval SOURCE_CGAL_VERSIONS_ONLY=yes \ # echo #fi - set -x wmake $targetType renumberMethods -if [ -n "$BOOST_ARCH_PATH" -o "$boost_version" = "boost-system" ] +if [ -d "$BOOST_ARCH_PATH/include/boost" ] || \ + [ "${BOOST_ARCH_PATH##*-}" = system -a -d /usr/include/boost ] then wmake $targetType SloanRenumber else echo - echo "Skipping SloanRenumber" + echo "Skipping SloanRenumber (no boost)" echo fi - -if [ -n "$ZOLTAN_ARCH_PATH" ] +if [ -d "$ZOLTAN_ARCH_PATH" ] then wmake $targetType zoltanRenumber else