mirror of
https://develop.openfoam.com/Development/ThirdParty-common.git
synced 2025-12-08 06:57:50 +00:00
ENH: improve flexibility of make scripts
- the various make scripts now also search hierarchical sources,
which makes it easier to organize sources. The secondary
sub-directory is the lower-case value of the package stripped of
trailing non-alphabet characters.
For example, searching for ParaView-v5.9.1
sources/
|-- adios
| |-- ...
| |-- ADIOS2-2.7.1
| \-- adios-1.13.1
|-- cgal
| |-- CGAL-4.12.2
| \-- CGAL-4.14.2
| ...
|-- openmpi
| |-- openmpi-4.0.3
| \-- openmpi-4.1.1
|-- paraview
| |-- ParaView-v5.6.1
| \-- ParaView-v5.9.1
\-- scotch
...
- additional out-of-source build options
FOAM_THIRD_PARTY_BUILDROOT :
Replace WM_THIRD_PARTY_DIR as the root for build/ and platforms/
FOAM_THIRD_PARTY_SOURCES :
Alternative to WM_THIRD_PARTY_DIR/sources/
- rationalise internal package variable names for easier maintenance
This commit is contained in:
26
makeSCOTCH
26
makeSCOTCH
@ -20,13 +20,15 @@
|
||||
# ----------------------------------------------
|
||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||
#------------------------------------------------------------------------------
|
||||
# Run from third-party directory only
|
||||
cd "${0%/*}" || exit
|
||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
}
|
||||
if : # Run from third-party directory
|
||||
then
|
||||
cd "${0%/*}" || exit
|
||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||
#------------------------------------------------------------------------------
|
||||
_foamConfig scotch # Get SCOTCH_ARCH_PATH, SCOTCH_VERSION
|
||||
@ -36,6 +38,11 @@ PACKAGE="${SCOTCH_VERSION:-system}"
|
||||
unset withMPI
|
||||
case "$WM_MPLIB" in (*MPI*) [ "$FOAM_MPI" = dummy ] || withMPI=true ;; esac
|
||||
|
||||
if nonStandardPlatforms # Possibly unreliable inherited values
|
||||
then
|
||||
unset SCOTCH_ARCH_PATH
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
printVersions() { listPackageVersions scotch; exit 0; }
|
||||
printHelp() {
|
||||
@ -82,7 +89,8 @@ do
|
||||
-no-mpi) unset withMPI ;;
|
||||
-no-extlib) optNoExtlib=true ;; # Hidden option
|
||||
|
||||
scotch-[0-9]* | scotch-git | scotch_* )
|
||||
scotch/ | sources/scotch* |\
|
||||
scotch-[0-9]* | scotch-v[0-9]* | scotch-git | scotch_* )
|
||||
PACKAGE="${1%%/}"
|
||||
unset SCOTCH_ARCH_PATH # Avoid inconsistency
|
||||
;;
|
||||
@ -118,7 +126,7 @@ fi
|
||||
# *SOURCE : location of original sources
|
||||
# *PREFIX : installation directory
|
||||
|
||||
PKG_SOURCE="$sourceBASE/$PACKAGE"
|
||||
PKG_SOURCE="$(findSourceDir "$PACKAGE")"
|
||||
PACKAGE="$(basename "$PACKAGE")"
|
||||
PKG_PREFIX="$installBASE$WM_SIZE_OPTIONS/$PACKAGE"
|
||||
export GIT_DIR="$PKG_SOURCE/.git"
|
||||
|
||||
Reference in New Issue
Block a user