ENH: delay testing of FOAM_EXT_LIBBIN

- only test in the packages that actually require it.
  State as a requirement.

ENH: skip build of packages with known mingw issues

- primarily kahip and pt-scotch.
  Others may also have issues, but for these we tend to use system
  packages anyhow.

ENH: add '-force' option to various scripts

- overrides some _lazy_ build logic
This commit is contained in:
Mark Olesen
2020-06-24 10:22:40 +02:00
parent 36f89097d8
commit bdd4266e2f
21 changed files with 169 additions and 104 deletions

View File

@ -7,11 +7,10 @@
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2011 OpenFOAM Foundation
# Copyright (C) 2016-2019 OpenCFD Ltd.
# Copyright (C) 2016-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# Allclean
@ -35,10 +34,10 @@ usage() {
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
cat<<USAGE
Usage: ${0##*/} [OPTION] [<platform> [ ... <platformN> ]]
Usage: ${0##*/} [OPTION] [platform [ ... platformN]]
options:
-all remove all platforms directories.
-current clean the current platform ($WM_OPTIONS).
-all remove all platforms directories
-current clean the current platform ($WM_OPTIONS)
-help print the usage
Cleanup intermediate build directories.
@ -50,10 +49,11 @@ USAGE
}
# Print help message
if [ "$1" = "-h" -o "$1" = "-help" ]
then
case "$1" in
(-h | -help*)
usage
fi
;;
esac
#------------------------------------------------------------------------------
@ -124,7 +124,7 @@ fi
removePlatform()
{
local platform="$1"
if [ -n "$platform" -a -d "platforms/$platform" ]
if [ -n "$platform" ] && [ -d "platforms/$platform" ]
then
echo
echo "Cleaning platform '$platform'"

View File

@ -7,14 +7,13 @@
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2011-2016 OpenFOAM Foundation
# Copyright (C) 2016-2019 OpenCFD Ltd.
# Copyright (C) 2016-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# Allwmake
# ThirdParty Allwmake
#
# Description
# Build script for ThirdParty applications/libraries
@ -29,11 +28,6 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
echo " Check your OpenFOAM environment and installation"
exit 1
}
[ -n "$FOAM_EXT_LIBBIN" ] || {
echo "Error (${0##*/}) : \$FOAM_EXT_LIBBIN not set for ThirdParty"
echo " Check your OpenFOAM environment and installation"
exit 1
}
. etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------
exportCompiler true # Compiler info + flags for CMake/configure
@ -54,7 +48,7 @@ echo Build MPI libraries if required
echo " $MPI_ARCH_PATH"
case "$WM_MPLIB" in
(OPENMPI | MPICH)
./make$WM_MPLIB -test "$MPI_ARCH_PATH" || ./make$WM_MPLIB
./make"$WM_MPLIB" -test "$MPI_ARCH_PATH" || ./make"$WM_MPLIB"
;;
esac
@ -103,7 +97,7 @@ echo
echo ========================================
if [ -n "$CGAL_ARCH_PATH" ]
then
echo "CGAL/boost"
echo "cgal/boost"
./makeCGAL -test "$CGAL_ARCH_PATH" "$BOOST_ARCH_PATH" || \
./makeCGAL || warnBuildIssues CGAL
else

View File

@ -3,12 +3,13 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2019 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# testThirdPartyFunctions

View File

@ -267,7 +267,7 @@ addMesaSupport()
return
fi
if [ -d "$MESA_INCLUDE" -a -f "$MESA_LIBRARY" ]
if [ -d "$MESA_INCLUDE" ] && [ -f "$MESA_LIBRARY" ]
then
addCMakeVariable "VTK_OPENGL_HAS_OSMESA=ON"
addCMakeVariable "OSMESA_INCLUDE_DIR=$MESA_INCLUDE"
@ -479,7 +479,7 @@ INFO
# Non-system installation of QT?
case "$qtLib" in (/usr/lib | /usr/lib64) unset qtLib ;; esac
if [ "${qmake%/*}" != /usr/bin -a -d "$qtLib" ]
if [ "${qmake%/*}" != /usr/bin ] && [ -d "$qtLib" ]
then
/bin/cat<<INFO

View File

@ -2,14 +2,14 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# | Copyright (C) 2011 OpenFOAM Foundation
# Copyright (C) 2011 OpenFOAM Foundation
# Copyright (C) 2016-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# File
# etc/tools/QtFunction
@ -35,7 +35,7 @@ createQtConf()
{
local confFile="$QT_ARCH_PATH/bin/qt.conf"
if [ -n "$QT_ARCH_PATH" -a -d "$QT_ARCH_PATH/bin" ]
if [ -n "$QT_ARCH_PATH" ] && [ -d "$QT_ARCH_PATH/bin" ]
then
/bin/cat << QT_CONF > $confFile
[Paths]

View File

@ -326,6 +326,20 @@ requireWMakeToolchain()
}
# Require FOAM_EXT_LIBBIN for some compilations
requireExtLibBin()
{
[ -n "$FOAM_EXT_LIBBIN" ] || {
exec 1>&2
echo
echo "Error: \$FOAM_EXT_LIBBIN not set for '${0##*/}"
echo " Check your OpenFOAM environment and installation"
echo
exit 1
}
}
# grep for package http or ftp entries in BUILD.md
# Should be of the form "[link xx]: http://..."
showDownloadHint()
@ -660,7 +674,7 @@ pkgconfigNewPrefix()
[ -d "$dir/$libdir" ] || continue
for i in $dir/$libdir/*.pc
do
if [ -f "$i" -a ! -L "$i" ]
if [ -f "$i" ] && [ ! -L "$i" ]
then
nfiles="x$nfiles"
sed -i~ -e 's@^\(prefix=\).*$@\1'"$dir@" $i
@ -708,7 +722,7 @@ pkgconfigAdjust()
[ -d "$dir/$libdir" ] || continue
for i in $dir/$libdir/*.pc
do
if [ -f "$i" -a ! -L "$i" ]
if [ -f "$i" ] && [ ! -L "$i" ]
then
nfiles="x$nfiles"
sed -i~ \

View File

@ -26,8 +26,9 @@
if [ "$1" = "-test" ]
then
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
dir="${2%/}" # <- FFTW_ARCH_PATH
if [ -d "$dir/include" -a -r "$dir/lib$WM_COMPILER_LIB_ARCH/libadios2$EXT_SO" ]
dir="${2%/}" # <- *_ARCH_PATH
if [ -d "$dir/include" ] \
&& [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libadios2$EXT_SO" ]
then
echo " adios2 include: $dir/include"
echo " adios2 library: $dir/lib$WM_COMPILER_LIB_ARCH"
@ -59,6 +60,7 @@ usage() {
usage: ${0##*/} [OPTION] [adios-VERSION]
options:
-force Force compilation, even if include/library already exists
-gcc Force use of gcc/g++
-cmake PATH With cmake from the given path
-help
@ -73,6 +75,8 @@ USAGE
#------------------------------------------------------------------------------
exportCompiler minimal # Minimal compiler info for CMake/configure
unset optForce
# Parse options
while [ "$#" -gt 0 ]
do
@ -80,6 +84,7 @@ do
'') ;; # Ignore empty
-h | -help) usage ;;
-gcc) useGcc ;;
-force) optForce=true ;;
-cmake)
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
@ -128,8 +133,9 @@ echo
# Needs future adjustment
# - for mpi-specific library locations
if [ -f $ADIOS2_ARCH_PATH/include/adios2.h \
-a -r $ADIOS2_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libadios2$EXT_SO ]
if [ -z "$optForce" ] \
&& [ -f "$ADIOS2_ARCH_PATH/include/adios2.h" ] \
&& [ -r "$ADIOS2_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libadios2$EXT_SO" ]
then
echo " ADIOS2 header in $ADIOS2_ARCH_PATH/include"
echo " ADIOS2 libs in $ADIOS2_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"

View File

@ -21,9 +21,6 @@
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Dynamic library ending (default is .so)
[ "$(uname -s)" = Darwin ] && EXT_SO=.dylib || EXT_SO=.so
# Run from third-party directory only
cd "${0%/*}" || exit
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
@ -31,11 +28,6 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
echo " Check your OpenFOAM environment and installation"
exit 1
}
[ -n "$FOAM_EXT_LIBBIN" ] || {
echo "Error (${0##*/}) : \$FOAM_EXT_LIBBIN not set"
echo " Check your OpenFOAM environment and installation"
exit 1
}
. etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------
@ -97,6 +89,7 @@ do
done
requireWMakeToolchain
requireExtLibBin
#------------------------------------------------------------------------------
#

View File

@ -45,6 +45,7 @@ usage() {
usage: ${0##*/} [OPTION] cmake-VERSION
options:
-force Force compilation, even if binary already exists
-gcc Force use of gcc/g++
-link Create additional symlink as 'cmake-system'
-help
@ -59,7 +60,8 @@ USAGE
#------------------------------------------------------------------------------
exportCompiler # Compiler info for CMake/configure
unset optLink
unset optForce optLink
# Parse options
while [ "$#" -gt 0 ]
do
@ -67,10 +69,9 @@ do
'') ;; # Ignore empty
-h | -help) usage ;;
-gcc) useGcc ;;
-force) optForce=true ;;
-link) optLink=true ;;
-link)
optLink=true
;;
cmake-[0-9]*)
cmakePACKAGE="${1%%/}"
;;
@ -97,7 +98,9 @@ fi
CMAKE_SOURCE_DIR=$sourceBASE/$cmakePACKAGE
CMAKE_ARCH_PATH=$installBASE/$cmakePACKAGE
if [ -d "$CMAKE_ARCH_PATH" -a -r "$CMAKE_ARCH_PATH/bin/cmake" ]
if [ -z "$optForce" ] \
&& [ -d "$CMAKE_ARCH_PATH" ] \
&& [ -r "$CMAKE_ARCH_PATH/bin/cmake" ]
then
echo "Already built: $cmakePACKAGE"
else
@ -124,7 +127,7 @@ else
}
fi
if [ "$optLink" = true -a -x "$CMAKE_ARCH_PATH/bin/cmake" ]
if [ "$optLink" = true ] && [ -x "$CMAKE_ARCH_PATH/bin/cmake" ]
then
(
cd "${CMAKE_ARCH_PATH%/*}" || exit
@ -135,7 +138,7 @@ then
then
exit 2
fi
ln -svf $cmakePACKAGE cmake-system
ln -svf "$cmakePACKAGE" cmake-system
)
fi

View File

@ -27,8 +27,9 @@
if [ "$1" = "-test" ]
then
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
dir="${2%/}" # <- FFTW_ARCH_PATH
if [ -d "$dir/include" -a -r "$dir/lib$WM_COMPILER_LIB_ARCH/libfftw3$EXT_SO" ]
dir="${2%/}" # <- *_ARCH_PATH
if [ -d "$dir/include" ] \
&& [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libfftw3$EXT_SO" ]
then
echo " fftw include: $dir/include"
echo " fftw library: $dir/lib$WM_COMPILER_LIB_ARCH"
@ -61,6 +62,7 @@ usage() {
usage: ${0##*/} [OPTION] [fftw-VERSION] [-- configure-options]
options:
-force Force compilation, even if include/library already exists
-gcc Force use of gcc/g++
-help
@ -74,6 +76,8 @@ USAGE
#------------------------------------------------------------------------------
exportCompiler # Compiler info for CMake/configure
unset optForce
# Parse options
while [ "$#" -gt 0 ]
do
@ -82,6 +86,7 @@ do
--) break;; # Extra configure options (leave on $@ for later detection)
-h | -help) usage ;;
-gcc) useGcc ;;
-force) optForce=true ;;
fftw-[0-9]* | fftw_[0-9]* | fftw-system )
fftwPACKAGE="${1%%/}"
@ -121,7 +126,8 @@ fi
FFTW_SOURCE_DIR=$sourceBASE/$fftwPACKAGE
FFTW_ARCH_PATH=$installBASE/$fftwPACKAGE
if [ -r "$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libfftw3$EXT_SO" ]
if [ -z "$optForce" ] \
&& [ -r "$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libfftw3$EXT_SO" ]
then
echo "Already has FFTW shared library"
else

View File

@ -43,6 +43,7 @@ usage() {
usage: ${0##*/} [OPTION] [lib|libso] [HYPRE-VERSION] [-- configure-options]
options:
-force Force compilation, even if include/library already exists
-gcc Force use of gcc/g++
-help
@ -56,6 +57,8 @@ USAGE
#------------------------------------------------------------------------------
exportCompiler # Compiler info for CMake/configure
unset optForce
# Parse options
while [ "$#" -gt 0 ]
do
@ -63,6 +66,7 @@ do
'') ;; # Ignore empty
-h | -help) usage ;;
-gcc) useGcc ;;
-force) optForce=true ;;
lib|libso)
targetType="$1"

View File

@ -27,7 +27,7 @@
if [ "$1" = "-test" ]
then
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
dir="${2%/}" # <- KAHIP_ARCH_PATH
dir="${2%/}" # <- *_ARCH_PATH
if [ -d "$dir/include" ]
then
for lib in \
@ -56,11 +56,6 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
echo " Check your OpenFOAM environment and installation"
exit 1
}
[ -n "$FOAM_EXT_LIBBIN" ] || {
echo "Error (${0##*/}) : \$FOAM_EXT_LIBBIN not set"
echo " Check your OpenFOAM environment and installation"
exit 1
}
. etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------
_foamConfig kahip
@ -78,6 +73,7 @@ usage()
Usage: ${0##*/} [OPTION] [lib|libso] [kahip-VERSION]
options:
-gcc Force use of gcc/g++
-force Force build attempt (mingw)
-cmake PATH With cmake from the given path
-help
@ -91,6 +87,8 @@ USAGE
#------------------------------------------------------------------------------
exportCompiler minimal # Minimal compiler info for CMake/configure
unset optForce
# Parse options
while [ "$#" -gt 0 ]
do
@ -98,6 +96,7 @@ do
'') ;; # Ignore empty
-h | -help) usage ;;
-gcc) useGcc ;;
-force) optForce=true ;;
-cmake)
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
@ -133,7 +132,21 @@ then
exit 0
fi
# Known build issues for mingw (uses some non-portable headers)
case "$WM_COMPILER" in
(Mingw*)
if [ "$optForce" = true ]
then
echo "Warning: kahip - known compilation issues with $WM_COMPILER"
else
echo "Skipping kahip - known compilation issues with $WM_COMPILER"
exit 0
fi
;;
esac
requireWMakeToolchain
requireExtLibBin
#------------------------------------------------------------------------------
#

View File

@ -27,7 +27,7 @@
if [ "$1" = "-test" ]
then
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
dir="${2%/}" # <- METIS_ARCH_PATH
dir="${2%/}" # <- *_ARCH_PATH
if [ -d "$dir/include" ]
then
for lib in \
@ -56,11 +56,6 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
echo " Check your OpenFOAM environment and installation"
exit 1
}
[ -n "$FOAM_EXT_LIBBIN" ] || {
echo "Error (${0##*/}) : \$FOAM_EXT_LIBBIN not set"
echo " Check your OpenFOAM environment and installation"
exit 1
}
. etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------
_foamConfig metis
@ -125,6 +120,8 @@ then
exit 0
fi
requireExtLibBin
#------------------------------------------------------------------------------
#
# Build METIS

View File

@ -44,6 +44,7 @@ usage() {
usage: ${0##*/} [OPTION] [mgridgen-VERSION]
options:
-force Force compilation, even if include/library already exists
-gcc Force use of gcc/g++
-help
@ -57,6 +58,8 @@ USAGE
#------------------------------------------------------------------------------
exportCompiler # Compiler info for CMake/configure
unset optForce
# Parse options
while [ "$#" -gt 0 ]
do
@ -64,6 +67,7 @@ do
'') ;; # Ignore empty
-h | -help) usage ;;
-gcc) useGcc ;;
-force) optForce=true ;;
mgridgen-[0-9]* | MGridGen-[0-9]* | parmgridgen-[0-9]* | ParMGridGen-[0-9]*)
mgridgenPACKAGE="${1%%/}"
@ -133,8 +137,9 @@ install()
# Needs future adjustment
# - for shared library
# - for mpi-specific library locations
if [ -f $MGRIDGEN_ARCH_PATH/include/mgridgen.h \
-a -r $MGRIDGEN_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmgrid.a ]
if [ -z "$optForce" ] \
&& [ -f "$MGRIDGEN_ARCH_PATH/include/mgridgen.h" \
&& [ -r "$MGRIDGEN_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmgrid.a" ]
then
echo " MGridGen header in $MGRIDGEN_ARCH_PATH/include"
echo " MGridGen libs in $MGRIDGEN_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" # static

View File

@ -6,11 +6,10 @@
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2017-2019 OpenCFD Ltd.
# Copyright (C) 2017-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# makeMPICH
@ -28,7 +27,7 @@
if [ "$1" = "-test" ]
then
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
dir="${2%/}" # <- MPI_ARCH_PATH
dir="${2%/}" # <- *_ARCH_PATH
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
then
echo "Have mpich shared library (${dir##*/})"
@ -73,6 +72,7 @@ usage() {
usage: ${0##*/} [OPTION] [mpich-VERSION] [-- configure-options]
options:
-force Force compilation, even if include/library already exists
-gcc Force use of gcc/g++
-help
@ -86,6 +86,8 @@ USAGE
#------------------------------------------------------------------------------
exportCompiler # Compiler info for CMake/configure
unset optForce
# Parse options
while [ "$#" -gt 0 ]
do
@ -94,6 +96,7 @@ do
--) break;; # Extra configure options (leave on $@ for later detection)
-h | -help) usage ;;
-gcc) useGcc ;;
-force) optForce=true ;;
mpich*)
mpiPACKAGE="${1%%/}"
@ -129,10 +132,12 @@ fi
MPI_SOURCE_DIR=$sourceBASE/$mpiPACKAGE
MPI_ARCH_PATH=$installBASE/$mpiPACKAGE
if [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
if [ -z "$optForce" ] \
&& [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
then
echo "Already has shared library"
elif [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
elif [ -z "$optForce" ] \
&& [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
then
echo "Already has static library"
else

View File

@ -6,11 +6,10 @@
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2019 OpenCFD Ltd.
# Copyright (C) 2019-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# makeMVAPICH2
@ -28,7 +27,7 @@
if [ "$1" = "-test" ]
then
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
dir="${2%/}" # <- MPI_ARCH_PATH
dir="${2%/}" # <- *_ARCH_PATH
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
then
echo "Have mpich shared library (${dir##*/})"
@ -73,6 +72,7 @@ usage() {
usage: ${0##*/} [OPTION] [mvapich2-VERSION] [-- configure-options]
options:
-force Force compilation, even if include/library already exists
-gcc Force use of gcc/g++
-help
@ -90,6 +90,8 @@ USAGE
#------------------------------------------------------------------------------
exportCompiler # Compiler info for CMake/configure
unset optForce
# Parse options
while [ "$#" -gt 0 ]
do
@ -98,6 +100,7 @@ do
--) break;; # Extra configure options (leave on $@ for later detection)
-h | -help) usage ;;
-gcc) useGcc ;;
-force) optForce=true ;;
mvapich*)
mpiPACKAGE="${1%%/}"
@ -133,10 +136,12 @@ fi
MPI_SOURCE_DIR=$sourceBASE/$mpiPACKAGE
MPI_ARCH_PATH=$installBASE/$mpiPACKAGE
if [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
if [ -z "$optForce" ] \
&& [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
then
echo "Already has shared library"
elif [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
elif [ -z "$optForce" ] \
&& [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
then
echo "Already has static library"
else

View File

@ -9,8 +9,7 @@
# Copyright (C) 2016-2019 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# makeMesa

View File

@ -27,7 +27,7 @@
if [ "$1" = "-test" ]
then
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
dir="${2%/}" # <- MPI_ARCH_PATH
dir="${2%/}" # <- *_ARCH_PATH
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
then
echo " Have openmpi shared library (${dir##*/})"
@ -72,6 +72,7 @@ usage() {
usage: ${0##*/} [OPTION] [openmpi-VERSION] [-- configure-options]
options:
-force Force compilation, even if include/library already exists
-gcc Force use of gcc/g++
-memcheck Configure with --enable-memcheck (requires valgrind.h)
-threaded Configure with --enable-mpi-thread-multiple
@ -88,7 +89,7 @@ USAGE
#------------------------------------------------------------------------------
exportCompiler # Compiler info for CMake/configure
unset optMemchecker optThreaded
unset optForce optMemchecker optThreaded
# Parse options
while [ "$#" -gt 0 ]
@ -98,6 +99,7 @@ do
--) break;; # Extra configure options (leave on $@ for later detection)
-h | -help) usage ;;
-gcc) useGcc ;;
-force) optForce=true ;;
-memcheck*) optMemchecker=true ;;
-thread*) optThreaded=enable ;;
-no-thread*) optThreaded=disable ;;
@ -136,10 +138,12 @@ fi
MPI_SOURCE_DIR=$sourceBASE/$mpiPACKAGE
MPI_ARCH_PATH=$installBASE/$mpiPACKAGE
if [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
if [ -z "$optForce" ] \
&& [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
then
echo "Already has shared library: $MPI_ARCH_PATH"
elif [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
elif [ -z "$optForce" ] \
&& [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
then
echo "Already has static library: $MPI_ARCH_PATH"
else

View File

@ -49,6 +49,7 @@ usage() {
usage: ${0##*/} [OPTION] [lib|libso] [HYPRE-VERSION] [PETSC-VERSION] [-- configure-options]
options:
-force Force compilation, even if include/library already exists
-gcc Force use of gcc/g++
-inplace Build/install inplace (expert option)
-no-hypre Disable automatic hypre detection
@ -69,7 +70,7 @@ USAGE
#------------------------------------------------------------------------------
exportCompiler # Compiler info for CMake/configure
unset optInplace
unset optForce optInplace
# Parse options
while [ "$#" -gt 0 ]
@ -78,10 +79,8 @@ do
'') ;; # Ignore empty
-h | -help) usage ;;
-gcc) useGcc ;;
-inplace)
optInplace=true
;;
-force) optForce=true ;;
-inplace) optInplace=true ;;
lib|libso)
targetType="$1"

9
makeQt
View File

@ -38,6 +38,7 @@ usage() {
usage: ${0##*/} [OPTION] [qt-VERSION] [-- configure-options]
options:
-force Force compilation, even if it already exists
-gcc Force use of gcc/g++
-help
@ -50,6 +51,8 @@ USAGE
#------------------------------------------------------------------------------
exportCompiler true # Compiler info + flags for CMake/configure
unset optForce
# Parse options
while [ "$#" -gt 0 ]
do
@ -58,6 +61,7 @@ do
--) break;; # Extra configure options (leave on $@ for later detection)
-h | -help) usage ;;
-gcc) useGcc ;;
-force) optForce=true ;;
-qt-[0-9]* | [0-9]* | qt-*)
# -qt-VERSION, VERSION, qt-VERSION, qt-everywhere-opensource-src-VERSION
@ -95,7 +99,10 @@ echo
echo ========================================
echo "Build Qt $qtPACKAGE"
echo
if [ -d "$QT_ARCH_PATH" -a -r "$QT_ARCH_PATH/bin/qmake" ]
if [ -z "$optForce" ] \
&& [ -d "$QT_ARCH_PATH" ] \
&& [ -r "$QT_ARCH_PATH/bin/qmake" ]
then
echo "Already built: Qt-$qtVERSION"
else

View File

@ -19,8 +19,6 @@
#
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Run from third-party directory only
cd "${0%/*}" || exit
@ -29,11 +27,6 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
echo " Check your OpenFOAM environment and installation"
exit 1
}
[ -n "$FOAM_EXT_LIBBIN" ] || {
echo "Error (${0##*/}) : \$FOAM_EXT_LIBBIN not set"
echo " Check your OpenFOAM environment and installation"
exit 1
}
. etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------
_foamConfig scotch # Get SCOTCH_ARCH_PATH, SCOTCH_VERSION
@ -53,6 +46,7 @@ usage()
Usage: ${0##*/} [OPTION] [libso] [scotch-VERSION]
options:
-force Force compilation, even if include/library already exists
Also force build attempt of pt-scotch (mingw)
-gcc Force use of gcc/g++
-bin Create scotch binaries as well (experimental)
-no-bin Suppress creation of scotch binaries (default)
@ -69,6 +63,7 @@ USAGE
#------------------------------------------------------------------------------
unset optBinaries optForce
# Parse options
while [ "$#" -gt 0 ]
do
@ -76,8 +71,8 @@ do
'') ;; # Ignore empty
-h | -help) usage ;;
-gcc) useGcc ;;
-force) optForce=true ;;
-bin) optBinaries=true ;;
-no-bin) unset optBinaries ;;
-no-mpi) unset withMPI ;;
@ -106,6 +101,8 @@ then
exit 0
fi
requireExtLibBin
#------------------------------------------------------------------------------
# Needs generalizing, but works fairly well
@ -230,6 +227,19 @@ then
exit 0
fi
# Known build issues for mingw (MS-MPI source code annotations)
case "$WM_COMPILER" in
(Mingw*)
if [ -z "$optForce" ]
then
echo "Skipping pt-scotch - known compilation issues with $WM_COMPILER"
exit 0
else
echo "Warning: pt-scotch - known compilation issues with $WM_COMPILER"
fi
;;
esac
# Build ptscotch if normal scotch was built (has include and library)
# (reuse prefix/include/lib dirs set above)