*** Note that this commit depends on a corresponding change in
ThirdParty-dev. Ensure that both repositories are up to date before
re-building OpenFOAM.
New environment variables have been added to explicitly control the
installation type of the thirdparty decomposition libraries and of the
ParaView visualiation software. These are set in the etc/bashrc and can
be overridden in a ~/.OpenFOAM/<version>/prefs.sh file or similar.
The variables relating to the decomposition libraries are SCOTCH_TYPE,
METIS_TYPE, PARMETIS_TYPE and ZOLTAN_TYPE, and they can take values of
none, system, or ThirdParty. In the case of ThirdParty, a
<library>_VERSION variable can also be specified. If the version is not
specified then the configuration will search for a source directory, and
if multiple such directories are found then the one with the highest
version number will be used.
The variable relating to ParaView is ParaView_TYPE, and this can be
similarly be set to none, system, or ThirdParty, and ParaView_VERSION
can also be specified when the type is ThirdParty. If the version is not
specified then the installation with the highest version number will be
used.
An example ~/.OpenFOAM/dev/prefs.sh file, in which all decomposition
libraries are enabled, and the Scotch and ParaView versions are
explicitly set, is as follows:
export SCOTCH_TYPE=ThirdParty
export SCOTCH_VERSION=7.0.3
export METIS_TYPE=ThirdParty
export PARMETIS_TYPE=ThirdParty
export ZOLTAN_TYPE=ThirdParty
export ParaView_TYPE=ThirdParty
export ParaView_VERSION=5.11.2
*** Note that if version numbers are not set then the configuration will
search for a decomposition source directory, but it will search for a
ParaView installation directory. This is because decomposition libraries
are built as part of OpenFOAM's ./Allwmake, but ParaView is not. This
distinction remains. If a local compilation of ParaView is needed, then
'./makeParaView -version X.XX.X' should be called explicitly in the
third party directory prior to building OpenFOAM.
The name of the third party directory can now also be independently set.
This simplifies some packaging processes in that it permits third party
to be located within the OpenFOAM installation directory and therefore
bundled into the same binary package.
53 lines
1.3 KiB
Bash
Executable File
53 lines
1.3 KiB
Bash
Executable File
#!/bin/sh
|
|
cd ${0%/*} || exit 1 # Run from this directory
|
|
|
|
# Parse arguments for library compilation
|
|
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
|
|
|
if [ ! -d "$ParaView_DIR" ]
|
|
then
|
|
echo " Warning: ParaView not found in $ParaView_DIR. Skipping."
|
|
exit 0
|
|
fi
|
|
|
|
# Ensure CMake gets the correct C/C++ compilers
|
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
|
|
|
wmake $targetType vtkPVblockMesh
|
|
wmake $targetType vtkPVFoam
|
|
|
|
if [ "$targetType" != "objects" ]
|
|
then
|
|
if $WM_PROJECT_DIR/bin/tools/foamVersionCompare $ParaView_VERSION ge 5.7.0
|
|
then
|
|
(
|
|
mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1
|
|
cd Make/$WM_OPTIONS
|
|
cmake ../..
|
|
make
|
|
)
|
|
else
|
|
(
|
|
cd PVblockMeshReader
|
|
mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1
|
|
cd Make/$WM_OPTIONS
|
|
cmake ../..
|
|
make
|
|
)
|
|
(
|
|
cd PVFoamReader
|
|
mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1
|
|
cd Make/$WM_OPTIONS
|
|
cmake ../..
|
|
make
|
|
)
|
|
fi
|
|
fi
|
|
|
|
# Remove the old $FOAM_LIBBIN/libvtkPV*.so libraries, so that they do not get
|
|
# linked in preference to the new $PV_PLUGIN_PATH/libvtkPV*.so libraries
|
|
rm -f $FOAM_LIBBIN/libvtkPV*
|
|
|
|
#------------------------------------------------------------------------------
|