mirror of
https://develop.openfoam.com/Development/ThirdParty-common.git
synced 2025-12-08 06:57:50 +00:00
ENH: remove reliance on OpenFOAM etc/config.sh/functions file.
- similar functionality in etc/tools/ThirdPartyFunctions to improve the independence of ThirdParty while reducing clutter in the callers. - add useGcc function for convenience - mask seeing our own git-repo when building STYLE: various items - eliminate old user-editable configuration in files - now command-line only. - use *_BUILD_DIR instead of *_BINARY_DIR for more clarity of the purpose - drop use of '-q' option for wmakeCheckPwd (already has stderr redirect) - drop checkVersion for makeParaView since it stopped working properly with newer paraview version CONFIG: update list of versions
This commit is contained in:
7
Allclean
7
Allclean
@ -32,7 +32,7 @@
|
|||||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
# Run from third-party directory only
|
||||||
cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
echo " Check your OpenFOAM environment and installation"
|
echo " Check your OpenFOAM environment and installation"
|
||||||
exit 1
|
exit 1
|
||||||
@ -66,7 +66,10 @@ fi
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Clean various packages via 'distclean'
|
# Clean various packages via 'distclean'
|
||||||
for i in openmpi-* metis-* adios-* ADIOS-*
|
for i in \
|
||||||
|
openmpi-* metis-* adios-* ADIOS-* gperftools-* qt-* \
|
||||||
|
gmp-* mpfr-* mpc-* gcc-* llvm-* \
|
||||||
|
;
|
||||||
do
|
do
|
||||||
[ -d "$i" ] && (
|
[ -d "$i" ] && (
|
||||||
echo
|
echo
|
||||||
|
|||||||
79
Allwmake
79
Allwmake
@ -32,7 +32,7 @@
|
|||||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
# Run from third-party directory only
|
||||||
cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
echo " Check your OpenFOAM environment and installation"
|
echo " Check your OpenFOAM environment and installation"
|
||||||
exit 1
|
exit 1
|
||||||
@ -44,7 +44,7 @@ cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
|||||||
}
|
}
|
||||||
. etc/tools/ThirdPartyFunctions
|
. etc/tools/ThirdPartyFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Export WM settings in a form that GNU configure recognizes
|
# Compiler/linker settings for CMake/configure
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
|
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
|
||||||
@ -105,7 +105,7 @@ echo " $SCOTCH_ARCH_PATH"
|
|||||||
|
|
||||||
SCOTCH_SOURCE_DIR=$sourceBASE/$SCOTCH_VERSION
|
SCOTCH_SOURCE_DIR=$sourceBASE/$SCOTCH_VERSION
|
||||||
|
|
||||||
# This needs generalizing, but works fairly well
|
# Needs generalizing, but works fairly well
|
||||||
scotchMakefile=../../etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM
|
scotchMakefile=../../etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM
|
||||||
|
|
||||||
if [ -f $SCOTCH_ARCH_PATH/include/scotch.h \
|
if [ -f $SCOTCH_ARCH_PATH/include/scotch.h \
|
||||||
@ -118,53 +118,56 @@ elif [ -d "$SCOTCH_SOURCE_DIR" ]
|
|||||||
then
|
then
|
||||||
(
|
(
|
||||||
cd $SCOTCH_SOURCE_DIR/src || exit 1
|
cd $SCOTCH_SOURCE_DIR/src || exit 1
|
||||||
|
export GIT_DIR=$SCOTCH_SOURCE_DIR/.git # Mask seeing our own git-repo
|
||||||
rm -rf $SCOTCH_ARCH_PATH
|
rm -rf $SCOTCH_ARCH_PATH
|
||||||
|
|
||||||
applyPatch $SCOTCH_VERSION .. # patch at parent-level
|
applyPatch $SCOTCH_VERSION .. # patch at parent-level
|
||||||
|
|
||||||
prefixDIR=$SCOTCH_ARCH_PATH
|
prefixDIR=$SCOTCH_ARCH_PATH
|
||||||
|
incDIR=$SCOTCH_ARCH_PATH/include
|
||||||
libDIR=$FOAM_EXT_LIBBIN
|
libDIR=$FOAM_EXT_LIBBIN
|
||||||
|
|
||||||
mkdir -p $prefixDIR 2>/dev/null
|
mkdir -p $prefixDIR 2>/dev/null
|
||||||
mkdir -p $libDIR 2>/dev/null
|
mkdir -p $incDIR 2>/dev/null
|
||||||
|
mkdir -p $libDIR 2>/dev/null
|
||||||
|
|
||||||
configOpt="prefix=$prefixDIR libdir=$libDIR"
|
# 'CC' already set (eg, from WM_CC) - set scotch-specific 'CCS' too
|
||||||
|
[ -n "$CC" ] && export CCS="$CC"
|
||||||
|
|
||||||
if [ -f $scotchMakefile ]
|
if [ -f $scotchMakefile ]
|
||||||
then
|
then
|
||||||
rm -f Makefile.inc
|
rm -f Makefile.inc
|
||||||
ln -s $scotchMakefile Makefile.inc
|
ln -s $scotchMakefile Makefile.inc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -f Makefile.inc ] || {
|
[ -f Makefile.inc ] || {
|
||||||
echo " Error: scotch needs an appropriate Makefile.inc"
|
echo " Error: scotch needs an appropriate Makefile.inc"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# handle non-gcc compilers
|
make realclean 2>/dev/null # Extra safety
|
||||||
unset configEnv
|
|
||||||
[ "${WM_CC:-gcc}" != gcc ] && configEnv="CC=$WM_CC CCS=$WM_CC"
|
|
||||||
|
|
||||||
make realclean 2>/dev/null # for safety
|
make -j $WM_NCOMPPROCS scotch \
|
||||||
|
&& make \
|
||||||
|
prefix=$prefixDIR \
|
||||||
|
includedir=$incDIR \
|
||||||
|
libdir=$libDIR \
|
||||||
|
install
|
||||||
|
|
||||||
make -j $WM_NCOMPPROCS $configEnv scotch \
|
make realclean 2>/dev/null || true # Failed cleanup is uncritical
|
||||||
&& make $configOpt install
|
|
||||||
|
|
||||||
# cleanup, could also remove Makefile.inc
|
|
||||||
make realclean 2>/dev/null
|
|
||||||
) || warnBuildIssues SCOTCH
|
) || warnBuildIssues SCOTCH
|
||||||
else
|
else
|
||||||
warnNotFound SCOTCH
|
warnNotFound SCOTCH
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build ptscotch if MPI (ThirdParty or system) is available
|
# Build ptscotch if MPI (ThirdParty or system) is available
|
||||||
# and normal scotch was build (has include and library)
|
# and normal scotch was built (has include and library)
|
||||||
if [ "${FOAM_MPI:-dummy}" != dummy ] && \
|
if [ "${FOAM_MPI:-dummy}" != dummy ] && \
|
||||||
[ -f $SCOTCH_ARCH_PATH/include/scotch.h \
|
[ -f $SCOTCH_ARCH_PATH/include/scotch.h \
|
||||||
-a -r $FOAM_EXT_LIBBIN/libscotch.so ] || \
|
-a -r $FOAM_EXT_LIBBIN/libscotch.so ] || \
|
||||||
{
|
{
|
||||||
|
# Report that the above tests failed and pass-through the failure
|
||||||
echo
|
echo
|
||||||
echo " WARNING: skipping pt-scotch - 'scotch.h' include file not found!"
|
echo " WARNING: skipping pt-scotch - no mpi or <scotch.h> not found"
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
then
|
then
|
||||||
@ -182,6 +185,7 @@ then
|
|||||||
else
|
else
|
||||||
(
|
(
|
||||||
cd $SCOTCH_SOURCE_DIR/src || exit 1
|
cd $SCOTCH_SOURCE_DIR/src || exit 1
|
||||||
|
export GIT_DIR=$SCOTCH_SOURCE_DIR/.git # Mask seeing our own git-repo
|
||||||
echo
|
echo
|
||||||
|
|
||||||
prefixDIR=$SCOTCH_ARCH_PATH
|
prefixDIR=$SCOTCH_ARCH_PATH
|
||||||
@ -189,42 +193,44 @@ then
|
|||||||
libDIR=$FOAM_EXT_LIBBIN/$FOAM_MPI
|
libDIR=$FOAM_EXT_LIBBIN/$FOAM_MPI
|
||||||
|
|
||||||
mkdir -p $prefixDIR 2>/dev/null
|
mkdir -p $prefixDIR 2>/dev/null
|
||||||
mkdir -p $libDIR 2>/dev/null
|
mkdir -p $incDIR 2>/dev/null
|
||||||
|
mkdir -p $libDIR 2>/dev/null
|
||||||
|
|
||||||
configOpt="prefix=$prefixDIR includedir=$incDIR libdir=$libDIR"
|
# 'CC' already set (eg, from WM_CC) - set scotch-specific 'CCS' too
|
||||||
|
[ -n "$CC" ] && export CCS="$CC"
|
||||||
|
|
||||||
if [ -f $scotchMakefile ]
|
if [ -f $scotchMakefile ]
|
||||||
then
|
then
|
||||||
rm -f Makefile.inc
|
rm -f Makefile.inc
|
||||||
ln -s $scotchMakefile Makefile.inc
|
ln -s $scotchMakefile Makefile.inc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -f Makefile.inc ] || {
|
[ -f Makefile.inc ] || {
|
||||||
echo " Error: scotch needs an appropriate Makefile.inc"
|
echo " Error: ptscotch needs an appropriate Makefile.inc"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# handle non-gcc compilers
|
make realclean 2>/dev/null # Extra safety
|
||||||
unset configEnv
|
|
||||||
[ "${WM_CC:-gcc}" != gcc ] && configEnv="CC=$WM_CC CCS=$WM_CC"
|
|
||||||
|
|
||||||
make realclean 2>/dev/null # for safety
|
make -j $WM_NCOMPPROCS ptscotch \
|
||||||
|
&& make \
|
||||||
|
prefix=$prefixDIR \
|
||||||
|
includedir=$incDIR \
|
||||||
|
libdir=$libDIR \
|
||||||
|
install
|
||||||
|
|
||||||
make -j $WM_NCOMPPROCS $configEnv ptscotch \
|
make realclean 2>/dev/null || true # Failed cleanup is uncritical
|
||||||
&& make $configOpt install
|
) || warnBuildIssues PTSCOTCH
|
||||||
|
|
||||||
# cleanup, could also remove Makefile.inc
|
|
||||||
make realclean 2>/dev/null
|
|
||||||
)
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# verify existence of ptscotch include
|
# Verify existence of ptscotch include
|
||||||
[ -f $SCOTCH_ARCH_PATH/include/$FOAM_MPI/ptscotch.h ] || {
|
[ -f $SCOTCH_ARCH_PATH/include/$FOAM_MPI/ptscotch.h ] || {
|
||||||
echo
|
echo
|
||||||
echo " WARNING: required include file 'ptscotch.h' not found!"
|
echo " WARNING: required include file 'ptscotch.h' not found!"
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Could now remove $SCOTCH_SOURCE_DIR/src/Makefile.inc
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -233,7 +239,7 @@ echo
|
|||||||
echo ========================================
|
echo ========================================
|
||||||
echo Build Metis decomposition
|
echo Build Metis decomposition
|
||||||
|
|
||||||
# get METIS_VERSION, METIS_ARCH_PATH
|
# Get METIS_VERSION, METIS_ARCH_PATH
|
||||||
if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/metis)
|
if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/metis)
|
||||||
then
|
then
|
||||||
. $settings
|
. $settings
|
||||||
@ -250,6 +256,7 @@ elif [ -d "$METIS_SOURCE_DIR" ]
|
|||||||
then
|
then
|
||||||
(
|
(
|
||||||
cd $METIS_SOURCE_DIR || exit 1
|
cd $METIS_SOURCE_DIR || exit 1
|
||||||
|
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
|
||||||
rm -rf $METIS_ARCH_PATH
|
rm -rf $METIS_ARCH_PATH
|
||||||
|
|
||||||
# Adjust metis integer size to match OpenFOAM label-size
|
# Adjust metis integer size to match OpenFOAM label-size
|
||||||
@ -260,10 +267,10 @@ then
|
|||||||
# - build normally and use mv to relocate it
|
# - build normally and use mv to relocate it
|
||||||
|
|
||||||
make config shared=1 prefix=$METIS_ARCH_PATH \
|
make config shared=1 prefix=$METIS_ARCH_PATH \
|
||||||
&& make -j $WM_NCOMPPROCS install \
|
&& make -j $WM_NCOMPPROCS install \
|
||||||
&& mv $METIS_ARCH_PATH/lib/libmetis.so $FOAM_EXT_LIBBIN
|
&& mv $METIS_ARCH_PATH/lib/libmetis.so $FOAM_EXT_LIBBIN
|
||||||
|
|
||||||
rmdir $METIS_ARCH_PATH/lib 2>/dev/null || true # failure is not critical
|
rmdir $METIS_ARCH_PATH/lib 2>/dev/null || true # Failed rmdir is uncritical
|
||||||
) || warnBuildIssues METIS
|
) || warnBuildIssues METIS
|
||||||
else
|
else
|
||||||
warnNotFound METIS
|
warnNotFound METIS
|
||||||
|
|||||||
49
BUILD.md
49
BUILD.md
@ -184,13 +184,13 @@ and save some disk space.
|
|||||||
sources that are bundled with ParaView.
|
sources that are bundled with ParaView.
|
||||||
For example, by using a symbolic link:
|
For example, by using a symbolic link:
|
||||||
|
|
||||||
ln -s ParaView-5.0.1/VTK VTK-7.1.0
|
ln -s ParaView-v5.3.0/VTK VTK-7.1.0
|
||||||
|
|
||||||
The appropriate VTK version number can be found from the contents of
|
The appropriate VTK version number can be found from the contents of
|
||||||
the `vtkVersion.cmake` file.
|
the `vtkVersion.cmake` file.
|
||||||
For example,
|
For example,
|
||||||
|
|
||||||
$ cat ParaView-5.0.1/VTK/CMake/vtkVersion.cmake
|
$ cat ParaView-v5.3.0/VTK/CMake/vtkVersion.cmake
|
||||||
|
|
||||||
# VTK version number components.
|
# VTK version number components.
|
||||||
set(VTK_MAJOR_VERSION 7)
|
set(VTK_MAJOR_VERSION 7)
|
||||||
@ -198,18 +198,17 @@ and save some disk space.
|
|||||||
set(VTK_BUILD_VERSION 0)
|
set(VTK_BUILD_VERSION 0)
|
||||||
|
|
||||||
### ParaView
|
### ParaView
|
||||||
- **ParaView-5.0.1** is the last version for which the OpenFOAM reader
|
|
||||||
modules (eg, to visualize a `blockMeshDict`) work in their present form.
|
|
||||||
|
|
||||||
- Building ParaView requires CMake, qmake and a `qt` development files.
|
- Building ParaView requires CMake, qmake and a `qt` development files.
|
||||||
Use the `-cmake`, `-qmake` and `-qt-*` options for `makeParaView` as
|
Use the `-cmake`, `-qmake` and `-qt-*` options for `makeParaView` as
|
||||||
required.
|
required.
|
||||||
See additional notes below about [making Qt](#makeQt) if necessary.
|
See additional notes below about [making Qt](#makeQt) if necessary.
|
||||||
|
|
||||||
|
#### 5.3.0
|
||||||
|
- Compiles without patching.
|
||||||
|
No known issues with the native OpenFOAM reader.
|
||||||
|
|
||||||
#### 5.2.0
|
#### 5.2.0
|
||||||
- Compiles without patching, but the OpenFOAM reader modules
|
- Compiles without patching, but the native OpenFOAM reader appears to be
|
||||||
(eg, to visualize a `blockMeshDict`) have not yet been migrated
|
|
||||||
to this version. Note that the native OpenFOAM reader appears to be
|
|
||||||
partially broken in this version.
|
partially broken in this version.
|
||||||
|
|
||||||
#### 4.4.0/5.0.0/5.0.1/5.1.2
|
#### 4.4.0/5.0.0/5.0.1/5.1.2
|
||||||
@ -245,7 +244,7 @@ and save some disk space.
|
|||||||
|
|
||||||
./makeParaView -qt-4.8.7 5.0.1
|
./makeParaView -qt-4.8.7 5.0.1
|
||||||
|
|
||||||
- ParaView does not yet support QT5 (Dec-2016, but this will soon change).
|
- ParaView versions prior to 5.3.0 do not properly support QT5.
|
||||||
|
|
||||||
- If you relocate the third-party directory to another location
|
- If you relocate the third-party directory to another location
|
||||||
(eg, you built in your home directory, but want to install it in a
|
(eg, you built in your home directory, but want to install it in a
|
||||||
@ -332,8 +331,8 @@ GNU *configure* can only be used prior to clang version 3.9.
|
|||||||
| Name | Location
|
| Name | Location
|
||||||
|-----------------------|------------------------
|
|-----------------------|------------------------
|
||||||
| [MESA][page mesa] | [download][link mesa] or [older][older mesa]
|
| [MESA][page mesa] | [download][link mesa] or [older][older mesa]
|
||||||
| [ParaView][page ParaView] | [download][link ParaView]. The reader modules do not yet work with the newest paraview versions.
|
| [ParaView][page ParaView] | [download][link ParaView]
|
||||||
| [Qt][page Qt] | [repo][repo Qt] or [download][link Qt]. The newer [Qt5][newer Qt5] is **not** currently supported by ParaView.
|
| [Qt][page Qt] | [repo][repo Qt] or [download][link Qt]. The newer [Qt5][newer Qt5] only works with ParaView-5.3.0 and later.
|
||||||
|
|
||||||
|
|
||||||
### CMake Minimum Requirements <a name="min-cmake"></a>
|
### CMake Minimum Requirements <a name="min-cmake"></a>
|
||||||
@ -348,7 +347,8 @@ The minimum CMake requirements for building various components.
|
|||||||
2.8.4 cmake-3.6.0
|
2.8.4 cmake-3.6.0
|
||||||
3.3 ParaView-5.1.2
|
3.3 ParaView-5.1.2
|
||||||
3.3 ParaView-5.2.0
|
3.3 ParaView-5.2.0
|
||||||
3.4.3 llvm-3.9.0.src
|
3.3 ParaView-5.3.0
|
||||||
|
3.4.3 llvm-3.9.1
|
||||||
3.5 ParaView-5.1.0
|
3.5 ParaView-5.1.0
|
||||||
|
|
||||||
|
|
||||||
@ -378,26 +378,26 @@ The minimum gcc/g++ requirements for building various components.
|
|||||||
[page clang]: http://llvm.org/
|
[page clang]: http://llvm.org/
|
||||||
[page llvm]: http://llvm.org/
|
[page llvm]: http://llvm.org/
|
||||||
|
|
||||||
[link clang]: http://llvm.org/releases/3.7.0/cfe-3.7.0.src.tar.xz
|
[link clang]: http://llvm.org/releases/3.7.1/cfe-3.7.1.src.tar.xz
|
||||||
[link llvm]: http://llvm.org/releases/3.7.0/llvm-3.7.0.src.tar.xz
|
[link llvm]: http://llvm.org/releases/3.7.1/llvm-3.7.1.src.tar.xz
|
||||||
|
|
||||||
[newer clang]: http://llvm.org/releases/3.9.0/cfe-3.9.0.src.tar.xz
|
[newer clang]: http://llvm.org/releases/3.9.1/cfe-3.9.1.src.tar.xz
|
||||||
[newer llvm]: http://llvm.org/releases/3.9.0/llvm-3.9.0.src.tar.xz
|
[newer llvm]: http://llvm.org/releases/3.9.1/llvm-3.9.1.src.tar.xz
|
||||||
|
|
||||||
|
|
||||||
<!-- parallel -->
|
<!-- parallel -->
|
||||||
[page adios]: https://www.olcf.ornl.gov/center-projects/adios/
|
[page adios]: https://www.olcf.ornl.gov/center-projects/adios/
|
||||||
[repo adios]: https://github.com/ornladios/ADIOS
|
[repo adios]: https://github.com/ornladios/ADIOS
|
||||||
[link adios]: https://github.com/ornladios/ADIOS/archive/v1.11.0.tar.gz
|
[link adios]: https://github.com/ornladios/ADIOS/archive/v1.11.1.tar.gz
|
||||||
[altlink adios]: http://users.nccs.gov/%7Epnorbert/adios-1.11.0.tar.gz
|
[altlink adios]: http://users.nccs.gov/%7Epnorbert/adios-1.11.1.tar.gz
|
||||||
[page zfp]: http://computation.llnl.gov/projects/floating-point-compression/zfp-versions
|
[page zfp]: http://computation.llnl.gov/projects/floating-point-compression/zfp-versions
|
||||||
|
|
||||||
[page scotch]: https://www.labri.fr/perso/pelegrin/scotch/
|
[page scotch]: https://www.labri.fr/perso/pelegrin/scotch/
|
||||||
[link scotch]: https://gforge.inria.fr/frs/download.php/file/34099/scotch_6.0.3.tar.gz
|
[link scotch]: https://gforge.inria.fr/frs/download.php/file/34099/scotch_6.0.3.tar.gz
|
||||||
|
|
||||||
[page openmpi]: http://www.open-mpi.org/
|
[page openmpi]: http://www.open-mpi.org/
|
||||||
[link openmpi]: http://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.4.tar.bz2
|
[older openmpi]: http://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.6.tar.bz2
|
||||||
[newer openmpi]: https://www.open-mpi.org/software/ompi/v2.0/downloads/openmpi-2.0.1.tar.bz2
|
[link openmpi]: https://www.open-mpi.org/software/ompi/v2.0/downloads/openmpi-2.0.2.tar.bz2
|
||||||
|
|
||||||
|
|
||||||
<!-- general -->
|
<!-- general -->
|
||||||
@ -412,7 +412,7 @@ The minimum gcc/g++ requirements for building various components.
|
|||||||
[older CGAL]: https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.8.2/CGAL-4.8.2.tar.xz
|
[older CGAL]: https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.8.2/CGAL-4.8.2.tar.xz
|
||||||
|
|
||||||
[page FFTW]: http://www.fftw.org/
|
[page FFTW]: http://www.fftw.org/
|
||||||
[link FFTW]: http://www.fftw.org/fftw-3.3.5.tar.gz
|
[link FFTW]: http://www.fftw.org/fftw-3.3.6-pl1.tar.gz
|
||||||
|
|
||||||
[page cgns]: http://cgns.github.io/
|
[page cgns]: http://cgns.github.io/
|
||||||
[link ccmio]: http://portal.nersc.gov/project/visit/third_party/libccmio-2.6.1.tar.gz (check usage conditions)
|
[link ccmio]: http://portal.nersc.gov/project/visit/third_party/libccmio-2.6.1.tar.gz (check usage conditions)
|
||||||
@ -428,11 +428,8 @@ The minimum gcc/g++ requirements for building various components.
|
|||||||
<!-- Visualization -->
|
<!-- Visualization -->
|
||||||
|
|
||||||
[page ParaView]: http://www.paraview.org/
|
[page ParaView]: http://www.paraview.org/
|
||||||
[link ParaView]: http://www.paraview.org/files/v5.0/ParaView-v5.0.1-source.tar.gz
|
[link ParaView]: http://www.paraview.org/files/v5.3/ParaView-v5.3.0.tar.gz
|
||||||
|
[older ParaView]: http://www.paraview.org/files/v5.0/ParaView-v5.0.1-source.tar.gz
|
||||||
[older ParaView-44]: http://www.paraview.org/files/v4.4/ParaView-v4.4.0-source.tar.gz
|
|
||||||
[newer ParaView-51]: http://www.paraview.org/files/v5.1/ParaView-v5.1.2-source.tar.gz
|
|
||||||
[newer ParaView-52]: http://www.paraview.org/files/v5.2/ParaView-v5.2.0.tar.gz
|
|
||||||
|
|
||||||
[page mesa]: http://mesa3d.org/
|
[page mesa]: http://mesa3d.org/
|
||||||
[link mesa]: ftp://ftp.freedesktop.org/pub/mesa/13.0.3/mesa-13.0.3.tar.xz
|
[link mesa]: ftp://ftp.freedesktop.org/pub/mesa/13.0.3/mesa-13.0.3.tar.xz
|
||||||
|
|||||||
@ -46,7 +46,7 @@
|
|||||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party (parent) directory only
|
# Run from third-party (parent) directory only
|
||||||
wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo "Error (${0##*/}) : current directory is not \$WM_THIRD_PARTY_DIR"
|
echo "Error (${0##*/}) : current directory is not \$WM_THIRD_PARTY_DIR"
|
||||||
echo " Check your OpenFOAM environment and installation"
|
echo " Check your OpenFOAM environment and installation"
|
||||||
exit 1
|
exit 1
|
||||||
@ -75,9 +75,9 @@ USAGE
|
|||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help) usage ;;
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
pkgconfigAdjust "$1"
|
pkgconfigAdjust "$1"
|
||||||
;;
|
;;
|
||||||
|
|||||||
@ -44,7 +44,7 @@
|
|||||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party (parent) directory only
|
# Run from third-party (parent) directory only
|
||||||
wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo "Error (${0##*/}) : current directory is not \$WM_THIRD_PARTY_DIR"
|
echo "Error (${0##*/}) : current directory is not \$WM_THIRD_PARTY_DIR"
|
||||||
echo " Check your OpenFOAM environment and installation"
|
echo " Check your OpenFOAM environment and installation"
|
||||||
exit 1
|
exit 1
|
||||||
@ -72,9 +72,9 @@ USAGE
|
|||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help) usage ;;
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
pkgconfigNewPrefix "$1"
|
pkgconfigNewPrefix "$1"
|
||||||
;;
|
;;
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party (parent) directory only
|
# Run from third-party (parent) directory only
|
||||||
wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo "Error (${0##*/}) : current directory is not \$WM_THIRD_PARTY_DIR"
|
echo "Error (${0##*/}) : current directory is not \$WM_THIRD_PARTY_DIR"
|
||||||
echo " Check your OpenFOAM environment and installation"
|
echo " Check your OpenFOAM environment and installation"
|
||||||
exit 1
|
exit 1
|
||||||
@ -40,8 +40,6 @@ wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
|||||||
. etc/tools/ThirdPartyFunctions
|
. etc/tools/ThirdPartyFunctions
|
||||||
. etc/tools/QtFunctions
|
. etc/tools/QtFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
unset qtVERSION # No default version
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
usage() {
|
usage() {
|
||||||
exec 1>&2
|
exec 1>&2
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||||
@ -61,17 +59,17 @@ USAGE
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
unset forceOpt
|
unset optForce
|
||||||
|
|
||||||
# Parse options
|
# Parse options
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help) usage ;;
|
||||||
;;
|
|
||||||
-f | -force)
|
-f | -force)
|
||||||
forceOpt=true
|
optForce=true
|
||||||
;;
|
;;
|
||||||
-qt-[1-9]* | [1-9]* | qt-*)
|
-qt-[1-9]* | [1-9]* | qt-*)
|
||||||
# -qt-VERSION, VERSION, qt-VERSION, qt-everywhere-opensource-src-VERSION
|
# -qt-VERSION, VERSION, qt-VERSION, qt-everywhere-opensource-src-VERSION
|
||||||
@ -91,7 +89,7 @@ QT_ARCH_PATH=$installBASE/qt-$qtVERSION
|
|||||||
[ -n "$qtVERSION" ] || die "No QT version specified"
|
[ -n "$qtVERSION" ] || die "No QT version specified"
|
||||||
[ -d "$QT_ARCH_PATH" ] || die "No QT installation"
|
[ -d "$QT_ARCH_PATH" ] || die "No QT installation"
|
||||||
|
|
||||||
if [ "${forceOpt:-false}" = true ]
|
if [ "${optForce:-false}" = true ]
|
||||||
then
|
then
|
||||||
# Create qt.conf and adjust locations to use '${prefix}' internally
|
# Create qt.conf and adjust locations to use '${prefix}' internally
|
||||||
finalizeQt
|
finalizeQt
|
||||||
|
|||||||
@ -48,7 +48,7 @@ BUILD_TYPE=Release # The cmake build type
|
|||||||
# ParaView_VERSION and ParaView_MAJOR should already have been set
|
# ParaView_VERSION and ParaView_MAJOR should already have been set
|
||||||
#
|
#
|
||||||
# ParaView_SOURCE_DIR : location of the original sources
|
# ParaView_SOURCE_DIR : location of the original sources
|
||||||
# ParaView_BINARY_DIR : location of the build
|
# ParaView_BUILD_DIR : location of the build
|
||||||
# ParaView_DIR : location of the installed program
|
# ParaView_DIR : location of the installed program
|
||||||
#
|
#
|
||||||
setParaViewDirs()
|
setParaViewDirs()
|
||||||
@ -73,18 +73,17 @@ setParaViewDirs()
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION$BUILD_SUFFIX
|
ParaView_BUILD_DIR=$buildBASE/ParaView-$ParaView_VERSION$BUILD_SUFFIX
|
||||||
ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION$BUILD_SUFFIX
|
ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION$BUILD_SUFFIX
|
||||||
|
|
||||||
export ParaView_SOURCE_DIR ParaView_BINARY_DIR ParaView_DIR
|
export ParaView_SOURCE_DIR ParaView_BUILD_DIR ParaView_DIR
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "ParaView_SOURCE_DIR=$ParaView_SOURCE_DIR"
|
echo "ParaView_SOURCE_DIR=$ParaView_SOURCE_DIR"
|
||||||
echo "ParaView_BINARY_DIR=$ParaView_BINARY_DIR"
|
echo "ParaView_BUILD_DIR=$ParaView_BUILD_DIR"
|
||||||
echo "ParaView_DIR=$ParaView_DIR"
|
echo "ParaView_DIR=$ParaView_DIR"
|
||||||
|
|
||||||
# Prevent git queries from using the ThirdParty repository
|
export GIT_DIR=$ParaView_SOURCE_DIR/.git # Mask seeing our own git-repo
|
||||||
export GIT_DIR=$ParaView_SOURCE_DIR/.git
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -112,27 +111,6 @@ setParaViewVersion()
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
#
|
|
||||||
# Compare version information (specified vs what is found in CMakeLists.txt)
|
|
||||||
# Parse this type of content:
|
|
||||||
# set (PARAVIEW_VERSION_FULL "5.0.1")
|
|
||||||
#
|
|
||||||
checkVersion()
|
|
||||||
{
|
|
||||||
local ver=$(
|
|
||||||
sed -ne 's/^ *set *( *PARAVIEW_VERSION_FULL[ "]*\([.0-9]*\).*$/\1/ip' \
|
|
||||||
$ParaView_SOURCE_DIR/CMakeLists.txt
|
|
||||||
)
|
|
||||||
|
|
||||||
if [ "$ParaView_VERSION" != "$ver" ]
|
|
||||||
then
|
|
||||||
echo "(${ver:-none}) mismatch?"
|
|
||||||
else
|
|
||||||
echo "(${ver:-none})"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Set CMake cache variables
|
# Set CMake cache variables
|
||||||
#
|
#
|
||||||
@ -375,17 +353,17 @@ configParaView()
|
|||||||
local cmake=$(findCMake)
|
local cmake=$(findCMake)
|
||||||
|
|
||||||
# Remove any existing build folder and recreate
|
# Remove any existing build folder and recreate
|
||||||
if [ -d $ParaView_BINARY_DIR ]
|
if [ -d $ParaView_BUILD_DIR ]
|
||||||
then
|
then
|
||||||
echo "removing old build directory"
|
echo "removing old build directory"
|
||||||
echo " $ParaView_BINARY_DIR"
|
echo " $ParaView_BUILD_DIR"
|
||||||
rm -rf $ParaView_BINARY_DIR
|
rm -rf $ParaView_BUILD_DIR
|
||||||
fi
|
fi
|
||||||
mkdir -p $ParaView_BINARY_DIR
|
mkdir -p $ParaView_BUILD_DIR
|
||||||
|
|
||||||
addCMakeVariable "CMAKE_BUILD_TYPE=$BUILD_TYPE"
|
addCMakeVariable "CMAKE_BUILD_TYPE=$BUILD_TYPE"
|
||||||
|
|
||||||
cd $ParaView_BINARY_DIR || exit 1 # Change to build folder
|
cd $ParaView_BUILD_DIR || exit 1 # Change to build folder
|
||||||
|
|
||||||
echo "----"
|
echo "----"
|
||||||
echo "Configuring paraview-$ParaView_VERSION (major version: $ParaView_MAJOR)"
|
echo "Configuring paraview-$ParaView_VERSION (major version: $ParaView_MAJOR)"
|
||||||
@ -395,7 +373,7 @@ configParaView()
|
|||||||
echo " GL2 rendering : ${withGL2:-false}"
|
echo " GL2 rendering : ${withGL2:-false}"
|
||||||
echo " QT dev support : ${withQT:-true}"
|
echo " QT dev support : ${withQT:-true}"
|
||||||
echo " Source : $ParaView_SOURCE_DIR"
|
echo " Source : $ParaView_SOURCE_DIR"
|
||||||
echo " Build : $ParaView_BINARY_DIR"
|
echo " Build : $ParaView_BUILD_DIR"
|
||||||
echo " Target : $ParaView_DIR"
|
echo " Target : $ParaView_DIR"
|
||||||
echo " cmake : $cmake"
|
echo " cmake : $cmake"
|
||||||
echo " Build suffix : ${BUILD_SUFFIX:-none}"
|
echo " Build suffix : ${BUILD_SUFFIX:-none}"
|
||||||
@ -423,7 +401,7 @@ configParaView()
|
|||||||
#
|
#
|
||||||
makeParaView()
|
makeParaView()
|
||||||
{
|
{
|
||||||
cd $ParaView_BINARY_DIR || exit 1 # Change to build folder
|
cd $ParaView_BUILD_DIR || exit 1 # Change to build folder
|
||||||
echo " Starting make"
|
echo " Starting make"
|
||||||
time make -j $WM_NCOMPPROCS
|
time make -j $WM_NCOMPPROCS
|
||||||
echo " Done make"
|
echo " Done make"
|
||||||
@ -442,7 +420,7 @@ makeParaView()
|
|||||||
#
|
#
|
||||||
installParaView()
|
installParaView()
|
||||||
{
|
{
|
||||||
cd $ParaView_BINARY_DIR || exit 1 # Change to build folder
|
cd $ParaView_BUILD_DIR || exit 1 # Change to build folder
|
||||||
echo " Installing ParaView to $ParaView_DIR"
|
echo " Installing ParaView to $ParaView_DIR"
|
||||||
|
|
||||||
make install
|
make install
|
||||||
@ -468,7 +446,7 @@ INFO
|
|||||||
# Non-system installation of QT?
|
# Non-system installation of QT?
|
||||||
if [ "$qmake" != /usr/bin/qmake -a -d "$qtLib" ]
|
if [ "$qmake" != /usr/bin/qmake -a -d "$qtLib" ]
|
||||||
then
|
then
|
||||||
cat<< INFO
|
/bin/cat<<INFO
|
||||||
|
|
||||||
And adjust your LD_LIBRARY_PATH to include the following:
|
And adjust your LD_LIBRARY_PATH to include the following:
|
||||||
$qtLib
|
$qtLib
|
||||||
|
|||||||
@ -30,6 +30,13 @@
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Qt-related variables. Initialization at the end of the file.
|
||||||
|
|
||||||
|
qtTYPE=qt-everywhere-opensource-src
|
||||||
|
unset qtVERSION # No default version
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create a qt.conf file in the QT bin/
|
# Create a qt.conf file in the QT bin/
|
||||||
# - this can be modified easily if the qt installation is relocated
|
# - this can be modified easily if the qt installation is relocated
|
||||||
|
|||||||
@ -37,6 +37,30 @@ buildBASE=$WM_THIRD_PARTY_DIR/build/$WM_ARCH$WM_COMPILER
|
|||||||
installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER
|
installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER
|
||||||
|
|
||||||
unset BUILD_SUFFIX
|
unset BUILD_SUFFIX
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Force use of gcc/g++
|
||||||
|
useGcc()
|
||||||
|
{
|
||||||
|
export CC=gcc # Use gcc/g++
|
||||||
|
export CXX=g++
|
||||||
|
}
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Some functions as per OpenFOAM etc/config.sh/functions
|
||||||
|
|
||||||
|
unset -f _foamAddLib _foamAddMan _foamAddPath # Get settings only
|
||||||
|
unset -f _foamEtc
|
||||||
|
|
||||||
|
# Source an etc file
|
||||||
|
_foamEtc()
|
||||||
|
{
|
||||||
|
local file
|
||||||
|
if [ $# -gt 0 ] && file=$($WM_PROJECT_DIR/bin/foamEtcFile "$@")
|
||||||
|
then
|
||||||
|
. $file
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
@ -42,7 +42,7 @@ unset CMAKE_VARIABLES
|
|||||||
# VTK_VERSION and VTK_MAJOR should already have been set
|
# VTK_VERSION and VTK_MAJOR should already have been set
|
||||||
#
|
#
|
||||||
# VTK_SOURCE_DIR : location of the original sources
|
# VTK_SOURCE_DIR : location of the original sources
|
||||||
# VTK_BINARY_DIR : location of the build
|
# VTK_BUILD_DIR : location of the build
|
||||||
# VTK_DIR : location of the installed program
|
# VTK_DIR : location of the installed program
|
||||||
#
|
#
|
||||||
setVtkDirs()
|
setVtkDirs()
|
||||||
@ -67,18 +67,17 @@ setVtkDirs()
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
VTK_BINARY_DIR=$buildBASE/VTK-$VTK_VERSION$BUILD_SUFFIX
|
VTK_BUILD_DIR=$buildBASE/VTK-$VTK_VERSION$BUILD_SUFFIX
|
||||||
VTK_DIR=$installBASE/VTK-$VTK_VERSION$BUILD_SUFFIX
|
VTK_DIR=$installBASE/VTK-$VTK_VERSION$BUILD_SUFFIX
|
||||||
|
|
||||||
export VTK_SOURCE_DIR VTK_BINARY_DIR VTK_DIR
|
export VTK_SOURCE_DIR VTK_BUILD_DIR VTK_DIR
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "VTK_SOURCE_DIR=$VTK_SOURCE_DIR"
|
echo "VTK_SOURCE_DIR=$VTK_SOURCE_DIR"
|
||||||
echo "VTK_BINARY_DIR=$VTK_BINARY_DIR"
|
echo "VTK_BUILD_DIR=$VTK_BUILD_DIR"
|
||||||
echo "VTK_DIR=$VTK_DIR"
|
echo "VTK_DIR=$VTK_DIR"
|
||||||
|
|
||||||
# Prevent git queries from using the ThirdParty repository
|
export GIT_DIR=$VTK_SOURCE_DIR/.git # Mask seeing our own git-repo
|
||||||
export GIT_DIR=$VTK_SOURCE_DIR/.git
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -123,23 +122,23 @@ configVTK()
|
|||||||
local cmake=$(findCMake)
|
local cmake=$(findCMake)
|
||||||
|
|
||||||
# Remove any existing build folder and recreate
|
# Remove any existing build folder and recreate
|
||||||
if [ -d $VTK_BINARY_DIR ]
|
if [ -d $VTK_BUILD_DIR ]
|
||||||
then
|
then
|
||||||
echo "removing old build directory"
|
echo "removing old build directory"
|
||||||
echo " $VTK_BINARY_DIR"
|
echo " $VTK_BUILD_DIR"
|
||||||
rm -rf $VTK_BINARY_DIR
|
rm -rf $VTK_BUILD_DIR
|
||||||
fi
|
fi
|
||||||
mkdir -p $VTK_BINARY_DIR
|
mkdir -p $VTK_BUILD_DIR
|
||||||
|
|
||||||
addCMakeVariable "CMAKE_BUILD_TYPE=$BUILD_TYPE"
|
addCMakeVariable "CMAKE_BUILD_TYPE=$BUILD_TYPE"
|
||||||
|
|
||||||
cd $VTK_BINARY_DIR || exit 1 # change to build folder
|
cd $VTK_BUILD_DIR || exit 1 # change to build folder
|
||||||
|
|
||||||
echo "----"
|
echo "----"
|
||||||
echo "Configuring VTK-$VTK_VERSION"
|
echo "Configuring VTK-$VTK_VERSION"
|
||||||
echo " MESA support : ${withMESA:-false}"
|
echo " MESA support : ${withMESA:-false}"
|
||||||
echo " Source : $VTK_SOURCE_DIR"
|
echo " Source : $VTK_SOURCE_DIR"
|
||||||
echo " Build : $VTK_BINARY_DIR"
|
echo " Build : $VTK_BUILD_DIR"
|
||||||
echo " Target : $VTK_DIR"
|
echo " Target : $VTK_DIR"
|
||||||
echo " cmake : $cmake"
|
echo " cmake : $cmake"
|
||||||
echo " Build suffix : ${BUILD_SUFFIX:-none}"
|
echo " Build suffix : ${BUILD_SUFFIX:-none}"
|
||||||
@ -167,7 +166,7 @@ configVTK()
|
|||||||
#
|
#
|
||||||
makeVTK()
|
makeVTK()
|
||||||
{
|
{
|
||||||
cd $VTK_BINARY_DIR || exit 1 # Change to build folder
|
cd $VTK_BUILD_DIR || exit 1 # Change to build folder
|
||||||
echo " Starting make"
|
echo " Starting make"
|
||||||
time make -j $WM_NCOMPPROCS
|
time make -j $WM_NCOMPPROCS
|
||||||
echo " Done make"
|
echo " Done make"
|
||||||
@ -183,7 +182,7 @@ makeVTK()
|
|||||||
#
|
#
|
||||||
installVTK()
|
installVTK()
|
||||||
{
|
{
|
||||||
cd $VTK_BINARY_DIR || exit 1 # Change to build folder
|
cd $VTK_BUILD_DIR || exit 1 # Change to build folder
|
||||||
echo " Installing VTK to $VTK_DIR"
|
echo " Installing VTK to $VTK_DIR"
|
||||||
|
|
||||||
make install
|
make install
|
||||||
|
|||||||
31
makeADIOS
31
makeADIOS
@ -32,19 +32,19 @@
|
|||||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
# Run from third-party directory only
|
||||||
cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
echo " Check your OpenFOAM environment and installation"
|
echo " Check your OpenFOAM environment and installation"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
. etc/tools/ThirdPartyFunctions
|
. etc/tools/ThirdPartyFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# ADIOS version from OpenFOAM etc/config.sh file
|
|
||||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
# ADIOS version from OpenFOAM etc/config.sh file:
|
||||||
unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only
|
_foamEtc config.sh/ADIOS
|
||||||
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/ADIOS)
|
|
||||||
|
|
||||||
adiosPACKAGE=${adios_version:-adios-none}
|
adiosPACKAGE=${adios_version:-adios-none}
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
usage() {
|
usage() {
|
||||||
exec 1>&2
|
exec 1>&2
|
||||||
@ -64,7 +64,7 @@ USAGE
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Export WM settings in a form that GNU configure recognizes
|
# Compiler settings for CMake/configure
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
|
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
|
||||||
@ -74,13 +74,10 @@ USAGE
|
|||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help) usage ;;
|
||||||
;;
|
-gcc) useGcc ;;
|
||||||
-gcc)
|
|
||||||
export CC=gcc # use gcc/g++
|
|
||||||
export CXX=g++
|
|
||||||
;;
|
|
||||||
-cmake)
|
-cmake)
|
||||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
CMAKE_PATH="${2%%/}"
|
CMAKE_PATH="${2%%/}"
|
||||||
@ -280,9 +277,9 @@ then
|
|||||||
buildDIR=$buildBASE/$adiosPACKAGE
|
buildDIR=$buildBASE/$adiosPACKAGE
|
||||||
|
|
||||||
cd $ADIOS_SOURCE_DIR || exit 1
|
cd $ADIOS_SOURCE_DIR || exit 1
|
||||||
[ -e Makefile ] && make distclean 2>/dev/null
|
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
|
||||||
|
|
||||||
export GIT_DIR=$ADIOS_SOURCE_DIR/.git
|
[ -e Makefile ] && make distclean 2>/dev/null
|
||||||
|
|
||||||
applyPatch $adiosPACKAGE $ADIOS_SOURCE_DIR
|
applyPatch $adiosPACKAGE $ADIOS_SOURCE_DIR
|
||||||
|
|
||||||
@ -328,8 +325,7 @@ else
|
|||||||
(
|
(
|
||||||
buildDIR=$buildBASE/$adiosPACKAGE
|
buildDIR=$buildBASE/$adiosPACKAGE
|
||||||
cd $ADIOS_SOURCE_DIR || exit 1
|
cd $ADIOS_SOURCE_DIR || exit 1
|
||||||
|
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
|
||||||
export GIT_DIR=$ADIOS_SOURCE_DIR/.git
|
|
||||||
|
|
||||||
applyPatch $adiosPACKAGE $ADIOS_SOURCE_DIR
|
applyPatch $adiosPACKAGE $ADIOS_SOURCE_DIR
|
||||||
|
|
||||||
@ -354,6 +350,7 @@ else
|
|||||||
-DCMAKE_INSTALL_PREFIX=$ADIOS_ARCH_PATH \
|
-DCMAKE_INSTALL_PREFIX=$ADIOS_ARCH_PATH \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DBUILD_FORTRAN=FALSE \
|
-DBUILD_FORTRAN=FALSE \
|
||||||
|
${WM_QUIET:+-DCMAKE_RULE_MESSAGES=OFF} \
|
||||||
$ADIOS_SOURCE_DIR \
|
$ADIOS_SOURCE_DIR \
|
||||||
&& make -j $WM_NCOMPPROCS all \
|
&& make -j $WM_NCOMPPROCS all \
|
||||||
&& make install \
|
&& make install \
|
||||||
|
|||||||
49
makeCCMIO
49
makeCCMIO
@ -32,7 +32,7 @@
|
|||||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
# Run from third-party directory only
|
||||||
cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
echo " Check your OpenFOAM environment and installation"
|
echo " Check your OpenFOAM environment and installation"
|
||||||
exit 1
|
exit 1
|
||||||
@ -44,12 +44,13 @@ cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
|||||||
}
|
}
|
||||||
. etc/tools/ThirdPartyFunctions
|
. etc/tools/ThirdPartyFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# libccmio version from OpenFOAM etc/config.sh file
|
|
||||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
# libccmio version from OpenFOAM etc/config.sh file:
|
||||||
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/ccmio)
|
_foamEtc config.sh/ccmio
|
||||||
|
|
||||||
ccmioPACKAGE=${ccmio_version:-libccmio-2.6.1}
|
ccmioPACKAGE=${ccmio_version:-libccmio-2.6.1}
|
||||||
targetType=lib
|
targetType=lib # Default is static linkage
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
@ -59,6 +60,7 @@ usage()
|
|||||||
|
|
||||||
Usage: ${0##*/} [OPTION] [lib|libso] [libccmio-VERSION]
|
Usage: ${0##*/} [OPTION] [lib|libso] [libccmio-VERSION]
|
||||||
options:
|
options:
|
||||||
|
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||||
-help
|
-help
|
||||||
|
|
||||||
* Compile the proprietary libccmio library
|
* Compile the proprietary libccmio library
|
||||||
@ -82,9 +84,10 @@ USAGE
|
|||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help) usage ;;
|
||||||
;;
|
-gcc) useGcc ;;
|
||||||
|
|
||||||
lib|libso)
|
lib|libso)
|
||||||
targetType="$1"
|
targetType="$1"
|
||||||
;;
|
;;
|
||||||
@ -98,19 +101,20 @@ do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
# assert: directory must be available
|
|
||||||
[ -d "$ccmioPACKAGE" ] || die "missing source directory '$ccmioPACKAGE'"
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
CCMIO_SOURCE_DIR=$sourceBASE/$ccmioPACKAGE
|
|
||||||
CCMIO_ARCH_PATH=$installBASE/$ccmioPACKAGE
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Build LIBCCMIO
|
# Build LIBCCMIO
|
||||||
#
|
#
|
||||||
echo "---------------"
|
CCMIO_SOURCE_DIR=$sourceBASE/$ccmioPACKAGE
|
||||||
|
CCMIO_ARCH_PATH=$installBASE/$ccmioPACKAGE
|
||||||
|
|
||||||
|
# Sources must be available
|
||||||
|
[ -d "$CCMIO_SOURCE_DIR" ] || die "Missing sources: '$ccmioPACKAGE'"
|
||||||
|
|
||||||
(
|
(
|
||||||
cd $CCMIO_SOURCE_DIR || exit 1
|
cd $CCMIO_SOURCE_DIR || exit 1
|
||||||
|
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
|
||||||
|
|
||||||
incDIR=$CCMIO_ARCH_PATH/include/libccmio
|
incDIR=$CCMIO_ARCH_PATH/include/libccmio
|
||||||
libDIR=$CCMIO_ARCH_PATH/lib
|
libDIR=$CCMIO_ARCH_PATH/lib
|
||||||
|
|
||||||
@ -118,16 +122,17 @@ echo "---------------"
|
|||||||
mkdir -p $libDIR 2>/dev/null
|
mkdir -p $libDIR 2>/dev/null
|
||||||
|
|
||||||
cpMakeFiles libccmio 2>/dev/null
|
cpMakeFiles libccmio 2>/dev/null
|
||||||
|
|
||||||
|
# Place static libraries in sub-directory:
|
||||||
|
if [ "$targetType" = lib ]
|
||||||
|
then
|
||||||
|
export FOAM_EXT_LIBBIN=$libDIR
|
||||||
|
fi
|
||||||
|
|
||||||
if wmake $targetType
|
if wmake $targetType
|
||||||
then
|
then
|
||||||
# make headers available:
|
# Make headers available:
|
||||||
/bin/cp -pv libccmio/ccmio*.h $incDIR
|
/bin/cp -pv libccmio/ccmio*.h $incDIR
|
||||||
|
|
||||||
# relocate static libraries to sub-directory:
|
|
||||||
if [ "$targetType" = lib ]
|
|
||||||
then
|
|
||||||
/bin/mv -v $FOAM_EXT_LIBBIN/libccmio.a $libDIR
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
51
makeCGAL
51
makeCGAL
@ -65,26 +65,26 @@ then
|
|||||||
fi
|
fi
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
# Run from third-party directory only
|
||||||
cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
echo " Check your OpenFOAM environment and installation"
|
echo " Check your OpenFOAM environment and installation"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
. etc/tools/ThirdPartyFunctions
|
. etc/tools/ThirdPartyFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# CGAL, boost and gmp/mpfr versions from OpenFOAM etc/config.sh file
|
|
||||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
|
||||||
unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only
|
|
||||||
unset BOOST_ARCH_PATH CGAL_ARCH_PATH # purge current values
|
|
||||||
|
|
||||||
# compiler first, let CGAL config override GMP (eg, when there is no GMP)
|
unset BOOST_ARCH_PATH CGAL_ARCH_PATH # Purge current values
|
||||||
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/compiler)
|
|
||||||
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL)
|
# CGAL, boost and gmp/mpfr versions from OpenFOAM etc/config.sh files.
|
||||||
|
# Get compiler first and let CGAL config override GMP (eg, when there is no GMP)
|
||||||
|
_foamEtc config.sh/compiler
|
||||||
|
_foamEtc config.sh/CGAL
|
||||||
|
|
||||||
boostPACKAGE=${boost_version:-boost-system}
|
boostPACKAGE=${boost_version:-boost-system}
|
||||||
gmpPACKAGE=${gmp_version:-gmp-system}
|
gmpPACKAGE=${gmp_version:-gmp-system}
|
||||||
mpfrPACKAGE=${mpfr_version:-mpfr-system}
|
mpfrPACKAGE=${mpfr_version:-mpfr-system}
|
||||||
cgalPACKAGE=$cgal_version
|
cgalPACKAGE=$cgal_version
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
usage() {
|
usage() {
|
||||||
exec 1>&2
|
exec 1>&2
|
||||||
@ -116,7 +116,7 @@ USAGE
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Ensure CMake gets the correct C/C++ compiler
|
# Compiler settings for CMake/configure
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
|
||||||
@ -126,16 +126,10 @@ unset optHeadersOnly
|
|||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help) usage ;;
|
||||||
;;
|
-gcc) useGcc ;;
|
||||||
'')
|
|
||||||
# discard empty arguments
|
|
||||||
;;
|
|
||||||
-gcc)
|
|
||||||
export CC=gcc # use gcc/g++
|
|
||||||
export CXX=g++
|
|
||||||
;;
|
|
||||||
-cmake)
|
-cmake)
|
||||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
CMAKE_PATH="${2%%/}"
|
CMAKE_PATH="${2%%/}"
|
||||||
@ -222,6 +216,7 @@ else
|
|||||||
|
|
||||||
(
|
(
|
||||||
cd $BOOST_SOURCE_DIR || exit 1
|
cd $BOOST_SOURCE_DIR || exit 1
|
||||||
|
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
|
||||||
|
|
||||||
rm -rf $BOOST_ARCH_PATH
|
rm -rf $BOOST_ARCH_PATH
|
||||||
|
|
||||||
@ -280,11 +275,11 @@ SUMMARY
|
|||||||
# CGAL-4.9 normally builds into 'lib64', older versions into 'lib'.
|
# CGAL-4.9 normally builds into 'lib64', older versions into 'lib'.
|
||||||
#
|
#
|
||||||
# CGAL_SOURCE_DIR : location of the original sources
|
# CGAL_SOURCE_DIR : location of the original sources
|
||||||
# CGAL_BINARY_DIR : location of the build
|
# CGAL_BUILD_DIR : location of the build
|
||||||
# CGAL_ARCH_PATH : installation directory
|
# CGAL_ARCH_PATH : installation directory
|
||||||
|
|
||||||
CGAL_SOURCE_DIR=$sourceBASE/$cgalPACKAGE
|
CGAL_SOURCE_DIR=$sourceBASE/$cgalPACKAGE
|
||||||
CGAL_BINARY_DIR=$buildBASE/$cgalPACKAGE
|
CGAL_BUILD_DIR=$buildBASE/$cgalPACKAGE
|
||||||
: ${CGAL_ARCH_PATH:=$installBASE/$cgalPACKAGE} # Fallback
|
: ${CGAL_ARCH_PATH:=$installBASE/$cgalPACKAGE} # Fallback
|
||||||
|
|
||||||
# gmp/mpfr are installed without compiler name
|
# gmp/mpfr are installed without compiler name
|
||||||
@ -379,21 +374,22 @@ fi
|
|||||||
|
|
||||||
(
|
(
|
||||||
# Remove any existing build folder and recreate
|
# Remove any existing build folder and recreate
|
||||||
if [ -d $CGAL_BINARY_DIR ]
|
if [ -d $CGAL_BUILD_DIR ]
|
||||||
then
|
then
|
||||||
echo "removing old build directory"
|
echo "removing old build directory"
|
||||||
echo " $CGAL_BINARY_DIR"
|
echo " $CGAL_BUILD_DIR"
|
||||||
rm -rf $CGAL_BINARY_DIR
|
rm -rf $CGAL_BUILD_DIR
|
||||||
fi
|
fi
|
||||||
mkdir -p $CGAL_BINARY_DIR
|
mkdir -p $CGAL_BUILD_DIR
|
||||||
|
|
||||||
cd $CGAL_BINARY_DIR || exit 1
|
cd $CGAL_BUILD_DIR || exit 1
|
||||||
|
export GIT_DIR=$CGAL_SOURCE_DIR/.git # Mask seeing our own git-repo
|
||||||
|
|
||||||
unset configBoost configGmp configMpfr
|
unset configBoost configGmp configMpfr
|
||||||
echo "----"
|
echo "----"
|
||||||
echo "Configuring $cgalPACKAGE with boost $BOOST_VERSION"
|
echo "Configuring $cgalPACKAGE with boost $BOOST_VERSION"
|
||||||
echo " Source : $CGAL_SOURCE_DIR"
|
echo " Source : $CGAL_SOURCE_DIR"
|
||||||
echo " Build : $CGAL_BINARY_DIR"
|
echo " Build : $CGAL_BUILD_DIR"
|
||||||
echo " Target : $CGAL_ARCH_PATH"
|
echo " Target : $CGAL_ARCH_PATH"
|
||||||
|
|
||||||
|
|
||||||
@ -479,6 +475,7 @@ CMAKE_OPTIONS
|
|||||||
-DWITH_CGAL_Qt5=OFF \
|
-DWITH_CGAL_Qt5=OFF \
|
||||||
${optHeadersOnly:+-DCGAL_HEADER_ONLY=TRUE} \
|
${optHeadersOnly:+-DCGAL_HEADER_ONLY=TRUE} \
|
||||||
$configBoost $configGmp $configMpfr \
|
$configBoost $configGmp $configMpfr \
|
||||||
|
${WM_QUIET:+-DCMAKE_RULE_MESSAGES=OFF} \
|
||||||
$CGAL_SOURCE_DIR \
|
$CGAL_SOURCE_DIR \
|
||||||
&& set +x \
|
&& set +x \
|
||||||
&& make -j $WM_NCOMPPROCS \
|
&& make -j $WM_NCOMPPROCS \
|
||||||
|
|||||||
18
makeCmake
18
makeCmake
@ -35,15 +35,17 @@
|
|||||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
# Run from third-party directory only
|
||||||
cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
echo " Check your OpenFOAM environment and installation"
|
echo " Check your OpenFOAM environment and installation"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
. etc/tools/ThirdPartyFunctions
|
. etc/tools/ThirdPartyFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Special purpose script - no default version.
|
# Special purpose script - no default version.
|
||||||
unset cmakePACKAGE
|
unset cmakePACKAGE
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
usage() {
|
usage() {
|
||||||
exec 1>&2
|
exec 1>&2
|
||||||
@ -63,7 +65,7 @@ USAGE
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Ensure CMake gets the correct C/CC++ compiler
|
# Compiler settings for CMake/configure
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
|
||||||
@ -72,13 +74,10 @@ unset optLink
|
|||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help) usage ;;
|
||||||
;;
|
-gcc) useGcc ;;
|
||||||
-gcc)
|
|
||||||
export CC=gcc # use gcc/g++
|
|
||||||
export CXX=g++
|
|
||||||
;;
|
|
||||||
-link)
|
-link)
|
||||||
optLink=true
|
optLink=true
|
||||||
;;
|
;;
|
||||||
@ -117,6 +116,7 @@ else
|
|||||||
buildDIR=$buildBASE/$cmakePACKAGE
|
buildDIR=$buildBASE/$cmakePACKAGE
|
||||||
|
|
||||||
cd $CMAKE_SOURCE_DIR || exit 1
|
cd $CMAKE_SOURCE_DIR || exit 1
|
||||||
|
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
|
||||||
make distclean 2>/dev/null
|
make distclean 2>/dev/null
|
||||||
|
|
||||||
rm -rf $buildDIR
|
rm -rf $buildDIR
|
||||||
|
|||||||
26
makeFFTW
26
makeFFTW
@ -47,20 +47,19 @@ then
|
|||||||
fi
|
fi
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
# Run from third-party directory only
|
||||||
cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
echo " Check your OpenFOAM environment and installation"
|
echo " Check your OpenFOAM environment and installation"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
. etc/tools/ThirdPartyFunctions
|
. etc/tools/ThirdPartyFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# FFTW version from OpenFOAM etc/config.sh file
|
|
||||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
|
||||||
unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only
|
|
||||||
|
|
||||||
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/FFTW)
|
# FFTW version from OpenFOAM etc/config.sh file:
|
||||||
|
_foamEtc config.sh/FFTW
|
||||||
|
|
||||||
fftwPACKAGE=${fftw_version:-fftw-system}
|
fftwPACKAGE=${fftw_version:-fftw-system}
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
usage() {
|
usage() {
|
||||||
exec 1>&2
|
exec 1>&2
|
||||||
@ -79,7 +78,7 @@ USAGE
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Ensure configure gets the correct C/C++ compiler
|
# Compiler settings for CMake/configure
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
|
||||||
@ -87,16 +86,10 @@ USAGE
|
|||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help) usage ;;
|
||||||
;;
|
-gcc) useGcc ;;
|
||||||
'')
|
|
||||||
# discard empty arguments
|
|
||||||
;;
|
|
||||||
-gcc)
|
|
||||||
export CC=gcc # use gcc/g++
|
|
||||||
export CXX=g++
|
|
||||||
;;
|
|
||||||
fftw-[0-9]* | fftw_[0-9]* | fftw-system )
|
fftw-[0-9]* | fftw_[0-9]* | fftw-system )
|
||||||
fftwPACKAGE="${1%%/}"
|
fftwPACKAGE="${1%%/}"
|
||||||
;;
|
;;
|
||||||
@ -146,6 +139,7 @@ else
|
|||||||
buildDIR=$buildBASE/$fftwPACKAGE
|
buildDIR=$buildBASE/$fftwPACKAGE
|
||||||
|
|
||||||
cd $FFTW_SOURCE_DIR || exit 1
|
cd $FFTW_SOURCE_DIR || exit 1
|
||||||
|
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
|
||||||
|
|
||||||
rm -rf $FFTW_ARCH_PATH
|
rm -rf $FFTW_ARCH_PATH
|
||||||
rm -rf $buildDIR
|
rm -rf $buildDIR
|
||||||
|
|||||||
47
makeGcc
47
makeGcc
@ -44,24 +44,25 @@
|
|||||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
# Run from third-party directory only
|
||||||
cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
echo " Check your OpenFOAM environment and installation"
|
echo " Check your OpenFOAM environment and installation"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
. etc/tools/ThirdPartyFunctions
|
. etc/tools/ThirdPartyFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Default GCC, mpfr, gmp and mpc versions from OpenFOAM etc/config.sh file
|
|
||||||
WM_COMPILER_TYPE=ThirdParty # ensure we get the correct compiler settings
|
|
||||||
: ${WM_COMPILER:=Gcc} # this will still fail if 'Clang' was set
|
|
||||||
|
|
||||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
[ "${WM_COMPILER#Gcc}" = "$WM_COMPILER" ] && WM_COMPILER=Gcc # Force gcc
|
||||||
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/compiler)
|
WM_COMPILER_TYPE=ThirdParty # Ensure we get the correct settings
|
||||||
|
|
||||||
|
# Default GCC, mpfr, gmp and mpc versions from OpenFOAM etc/config.sh file:
|
||||||
|
_foamEtc config.sh/compiler
|
||||||
|
|
||||||
gmpPACKAGE=${gmp_version:-gmp-system}
|
gmpPACKAGE=${gmp_version:-gmp-system}
|
||||||
mpfrPACKAGE=${mpfr_version:-mpfr-system}
|
mpfrPACKAGE=${mpfr_version:-mpfr-system}
|
||||||
mpcPACKAGE=${mpc_version:-mpc-system}
|
mpcPACKAGE=${mpc_version:-mpc-system}
|
||||||
gccPACKAGE=$gcc_version
|
gccPACKAGE=$gcc_version
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
usage() {
|
usage() {
|
||||||
exec 1>&2
|
exec 1>&2
|
||||||
@ -94,9 +95,9 @@ unset optThreadSafe # unset=auto
|
|||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help) usage ;;
|
||||||
;;
|
|
||||||
-multi*)
|
-multi*)
|
||||||
optMultilib=enable
|
optMultilib=enable
|
||||||
;;
|
;;
|
||||||
@ -163,6 +164,18 @@ GMP_ARCH_PATH=$installBASE/$gmpPACKAGE
|
|||||||
MPFR_ARCH_PATH=$installBASE/$mpfrPACKAGE
|
MPFR_ARCH_PATH=$installBASE/$mpfrPACKAGE
|
||||||
MPC_ARCH_PATH=$installBASE/$mpcPACKAGE
|
MPC_ARCH_PATH=$installBASE/$mpcPACKAGE
|
||||||
|
|
||||||
|
# Prefix <dir> to LD_LIBRARY_PATH, if it exists. 0 on success, 1 on failure
|
||||||
|
addLib()
|
||||||
|
{
|
||||||
|
if [ -d "$1" ]
|
||||||
|
then
|
||||||
|
export LD_LIBRARY_PATH=$1:$LD_LIBRARY_PATH
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# ================
|
# ================
|
||||||
# Build GMP
|
# Build GMP
|
||||||
@ -182,6 +195,7 @@ else
|
|||||||
buildDIR=$buildBASE/$gmpPACKAGE
|
buildDIR=$buildBASE/$gmpPACKAGE
|
||||||
|
|
||||||
cd $sourceDIR || exit 1
|
cd $sourceDIR || exit 1
|
||||||
|
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
|
||||||
make distclean 2>/dev/null
|
make distclean 2>/dev/null
|
||||||
|
|
||||||
rm -rf $buildDIR
|
rm -rf $buildDIR
|
||||||
@ -203,10 +217,8 @@ else
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" ]
|
if addLib "$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
|
||||||
then
|
then
|
||||||
_foamAddLib "$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
|
|
||||||
|
|
||||||
configGMP=$(cat <<CONFIG_OPTIONS
|
configGMP=$(cat <<CONFIG_OPTIONS
|
||||||
--with-gmp-include=$GMP_ARCH_PATH/include
|
--with-gmp-include=$GMP_ARCH_PATH/include
|
||||||
--with-gmp-lib=$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
--with-gmp-lib=$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
||||||
@ -235,6 +247,7 @@ else
|
|||||||
buildDIR=$buildBASE/$mpfrPACKAGE
|
buildDIR=$buildBASE/$mpfrPACKAGE
|
||||||
|
|
||||||
cd $sourceDIR || exit 1
|
cd $sourceDIR || exit 1
|
||||||
|
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
|
||||||
make distclean 2>/dev/null
|
make distclean 2>/dev/null
|
||||||
|
|
||||||
rm -rf $buildDIR
|
rm -rf $buildDIR
|
||||||
@ -260,10 +273,8 @@ else
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$MPFR_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" ]
|
if addLib "$MPFR_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
|
||||||
then
|
then
|
||||||
_foamAddLib "$MPFR_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
|
|
||||||
|
|
||||||
configMPFR=$(cat <<CONFIG_OPTIONS
|
configMPFR=$(cat <<CONFIG_OPTIONS
|
||||||
--with-mpfr-include=$MPFR_ARCH_PATH/include \
|
--with-mpfr-include=$MPFR_ARCH_PATH/include \
|
||||||
--with-mpfr-lib=$MPFR_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
--with-mpfr-lib=$MPFR_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
||||||
@ -292,6 +303,7 @@ else
|
|||||||
buildDIR=$buildBASE/$mpcPACKAGE
|
buildDIR=$buildBASE/$mpcPACKAGE
|
||||||
|
|
||||||
cd $sourceDIR || exit 1
|
cd $sourceDIR || exit 1
|
||||||
|
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
|
||||||
make distclean 2>/dev/null
|
make distclean 2>/dev/null
|
||||||
|
|
||||||
rm -rf $buildDIR
|
rm -rf $buildDIR
|
||||||
@ -313,10 +325,8 @@ else
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$MPC_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" ]
|
if addLib "$MPC_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
|
||||||
then
|
then
|
||||||
_foamAddLib "$MPC_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
|
|
||||||
|
|
||||||
configMPC=$(cat <<CONFIG_OPTIONS
|
configMPC=$(cat <<CONFIG_OPTIONS
|
||||||
--with-mpc-include=$MPC_ARCH_PATH/include \
|
--with-mpc-include=$MPC_ARCH_PATH/include \
|
||||||
--with-mpc-lib=$MPC_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
--with-mpc-lib=$MPC_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
||||||
@ -349,6 +359,7 @@ else
|
|||||||
buildDIR=$buildBASE/$gccPACKAGE
|
buildDIR=$buildBASE/$gccPACKAGE
|
||||||
|
|
||||||
cd $sourceDIR || exit 1
|
cd $sourceDIR || exit 1
|
||||||
|
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
|
||||||
make distclean 2>/dev/null
|
make distclean 2>/dev/null
|
||||||
|
|
||||||
rm -rf $buildDIR
|
rm -rf $buildDIR
|
||||||
|
|||||||
@ -32,20 +32,19 @@
|
|||||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
# Run from third-party directory only
|
||||||
cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
echo " Check your OpenFOAM environment and installation"
|
echo " Check your OpenFOAM environment and installation"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
. etc/tools/ThirdPartyFunctions
|
. etc/tools/ThirdPartyFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Gperftools version from OpenFOAM etc/config.sh file
|
|
||||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
|
||||||
unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only
|
|
||||||
|
|
||||||
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/gperftools)
|
# Gperftools version from OpenFOAM etc/config.sh file:
|
||||||
|
_foamEtc config.sh/gperftools
|
||||||
|
|
||||||
gperftoolsPACKAGE=${gperftools_version:-gperftools-system}
|
gperftoolsPACKAGE=${gperftools_version:-gperftools-system}
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
usage() {
|
usage() {
|
||||||
exec 1>&2
|
exec 1>&2
|
||||||
@ -64,7 +63,7 @@ USAGE
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Ensure configure gets the correct C/C++ compiler
|
# Compiler settings for CMake/configure
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
|
||||||
@ -72,13 +71,10 @@ USAGE
|
|||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help) usage ;;
|
||||||
;;
|
-gcc) useGcc ;;
|
||||||
-gcc)
|
|
||||||
export CC=gcc # use gcc/g++
|
|
||||||
export CXX=g++
|
|
||||||
;;
|
|
||||||
gperftools-[0-9]* | gperftools-svn* | gperftools-git)
|
gperftools-[0-9]* | gperftools-svn* | gperftools-git)
|
||||||
gperftoolsPACKAGE="${1%%/}"
|
gperftoolsPACKAGE="${1%%/}"
|
||||||
;;
|
;;
|
||||||
@ -119,8 +115,8 @@ else
|
|||||||
buildDIR=$buildBASE/$gperftoolsPACKAGE
|
buildDIR=$buildBASE/$gperftoolsPACKAGE
|
||||||
|
|
||||||
cd $GPERFTOOLS_SOURCE_DIR || exit 1
|
cd $GPERFTOOLS_SOURCE_DIR || exit 1
|
||||||
|
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
|
||||||
make distclean 2>/dev/null
|
[ -e Makefile ] && make distclean 2>/dev/null
|
||||||
|
|
||||||
rm -rf $GPERFTOOLS_ARCH_PATH
|
rm -rf $GPERFTOOLS_ARCH_PATH
|
||||||
rm -rf $buildDIR
|
rm -rf $buildDIR
|
||||||
|
|||||||
44
makeLLVM
44
makeLLVM
@ -46,21 +46,22 @@
|
|||||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
# Run from third-party directory only
|
||||||
cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
echo " Check your OpenFOAM environment and installation"
|
echo " Check your OpenFOAM environment and installation"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
. etc/tools/ThirdPartyFunctions
|
. etc/tools/ThirdPartyFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# LLVM/Clang version from OpenFOAM etc/config.sh file
|
|
||||||
WM_COMPILER_TYPE=ThirdParty # ensure we get the correct compiler settings
|
|
||||||
WM_COMPILER=Clang # force values for 'clang'
|
|
||||||
|
|
||||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
[ "${WM_COMPILER#Clang}" = "$WM_COMPILER" ] && WM_COMPILER=Clang # Force clang
|
||||||
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/compiler)
|
WM_COMPILER_TYPE=ThirdParty # Ensure we get the correct settings
|
||||||
|
|
||||||
|
# LLVM/Clang version from OpenFOAM etc/config.sh file:
|
||||||
|
_foamEtc config.sh/compiler
|
||||||
|
|
||||||
llvmPACKAGE=$clang_version
|
llvmPACKAGE=$clang_version
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
usage() {
|
usage() {
|
||||||
exec 1>&2
|
exec 1>&2
|
||||||
@ -80,7 +81,7 @@ USAGE
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Ensure CMake gets the correct C/C++ compiler
|
# Compiler settings for CMake/configure
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
|
||||||
@ -88,13 +89,10 @@ USAGE
|
|||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help) usage ;;
|
||||||
;;
|
-gcc) useGcc ;;
|
||||||
-gcc)
|
|
||||||
export CC=gcc # use gcc/g++
|
|
||||||
export CXX=g++
|
|
||||||
;;
|
|
||||||
-cmake)
|
-cmake)
|
||||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
CMAKE_PATH="${2%%/}"
|
CMAKE_PATH="${2%%/}"
|
||||||
@ -119,12 +117,12 @@ installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
|||||||
|
|
||||||
# Build LLVM (clang)
|
# Build LLVM (clang)
|
||||||
# LLVM_SOURCE_DIR : location of the original sources
|
# LLVM_SOURCE_DIR : location of the original sources
|
||||||
# LLVM_BINARY_DIR : location of the build
|
# LLVM_BUILD_DIR : location of the build
|
||||||
# LLVM_ARCH_PATH : location of the installed program
|
# LLVM_ARCH_PATH : location of the installed program
|
||||||
# - Strip any trailing '.src' from the proper names
|
# - Strip any trailing '.src' from the proper names
|
||||||
|
|
||||||
LLVM_SOURCE_DIR=$sourceBASE/$llvmPACKAGE
|
LLVM_SOURCE_DIR=$sourceBASE/$llvmPACKAGE
|
||||||
LLVM_BINARY_DIR=$buildBASE/${llvmPACKAGE%%.src}
|
LLVM_BUILD_DIR=$buildBASE/${llvmPACKAGE%%.src}
|
||||||
LLVM_ARCH_PATH=$installBASE/${llvmPACKAGE%%.src}
|
LLVM_ARCH_PATH=$installBASE/${llvmPACKAGE%%.src}
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -143,11 +141,12 @@ then
|
|||||||
echo
|
echo
|
||||||
(
|
(
|
||||||
cd $LLVM_SOURCE_DIR || exit 1
|
cd $LLVM_SOURCE_DIR || exit 1
|
||||||
|
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
|
||||||
make distclean 2>/dev/null
|
make distclean 2>/dev/null
|
||||||
|
|
||||||
rm -rf $LLVM_BINARY_DIR
|
rm -rf $LLVM_BUILD_DIR
|
||||||
mkdir -p $LLVM_BINARY_DIR
|
mkdir -p $LLVM_BUILD_DIR
|
||||||
cd $LLVM_BINARY_DIR
|
cd $LLVM_BUILD_DIR
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
$LLVM_SOURCE_DIR/configure \
|
$LLVM_SOURCE_DIR/configure \
|
||||||
@ -171,10 +170,11 @@ else
|
|||||||
echo
|
echo
|
||||||
(
|
(
|
||||||
cd $LLVM_SOURCE_DIR || exit 1
|
cd $LLVM_SOURCE_DIR || exit 1
|
||||||
|
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
|
||||||
|
|
||||||
rm -rf $LLVM_BINARY_DIR
|
rm -rf $LLVM_BUILD_DIR
|
||||||
mkdir -p $LLVM_BINARY_DIR
|
mkdir -p $LLVM_BUILD_DIR
|
||||||
cd $LLVM_BINARY_DIR
|
cd $LLVM_BUILD_DIR
|
||||||
|
|
||||||
cmake=$(findCMake)
|
cmake=$(findCMake)
|
||||||
|
|
||||||
|
|||||||
37
makeMPICH
37
makeMPICH
@ -51,27 +51,33 @@ then
|
|||||||
fi
|
fi
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
# Run from third-party directory only
|
||||||
cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
echo " Check your OpenFOAM environment and installation"
|
echo " Check your OpenFOAM environment and installation"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
. etc/tools/ThirdPartyFunctions
|
. etc/tools/ThirdPartyFunctions
|
||||||
|
# Transition
|
||||||
|
# ~~~~~~~~~~
|
||||||
|
_foamAddLib() { true; }
|
||||||
|
_foamAddMan() { true; }
|
||||||
|
_foamAddPath() { true; }
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# get mpich version
|
|
||||||
WM_MPLIB=MPICH # ensure we get the third-party settings
|
|
||||||
|
|
||||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
WM_MPLIB=MPICH # Ensure we get the correct MPI
|
||||||
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/mpi)
|
|
||||||
|
# mpich version from OpenFOAM etc/config.sh file:
|
||||||
|
_foamEtc config.sh/mpi
|
||||||
|
|
||||||
mpiPACKAGE=${FOAM_MPI:-mpich-system}
|
mpiPACKAGE=${FOAM_MPI:-mpich-system}
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
usage() {
|
usage() {
|
||||||
exec 1>&2
|
exec 1>&2
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||||
cat<<USAGE
|
cat<<USAGE
|
||||||
|
|
||||||
usage: ${0##*/} [OPTION] [openmpi-VERSION]
|
usage: ${0##*/} [OPTION] [mpich-VERSION]
|
||||||
options:
|
options:
|
||||||
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||||
-help
|
-help
|
||||||
@ -83,7 +89,7 @@ USAGE
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Ensure configure gets the correct C/C++ compiler
|
# Compiler settings for CMake/configure
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
|
||||||
@ -91,16 +97,10 @@ USAGE
|
|||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help) usage ;;
|
||||||
;;
|
-gcc) useGcc ;;
|
||||||
'')
|
|
||||||
# discard empty arguments
|
|
||||||
;;
|
|
||||||
-gcc)
|
|
||||||
export CC=gcc # use gcc/g++
|
|
||||||
export CXX=g++
|
|
||||||
;;
|
|
||||||
mpich*)
|
mpich*)
|
||||||
mpiPACKAGE="${1%%/}"
|
mpiPACKAGE="${1%%/}"
|
||||||
;;
|
;;
|
||||||
@ -126,7 +126,7 @@ fi
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Build openmpi
|
# Build mpich
|
||||||
#
|
#
|
||||||
# MPI_SOURCE_DIR : location of the original sources
|
# MPI_SOURCE_DIR : location of the original sources
|
||||||
# MPI_ARCH_PATH : installation directory
|
# MPI_ARCH_PATH : installation directory
|
||||||
@ -151,6 +151,7 @@ else
|
|||||||
# ----------------------------
|
# ----------------------------
|
||||||
|
|
||||||
cd $MPI_SOURCE_DIR || exit 1
|
cd $MPI_SOURCE_DIR || exit 1
|
||||||
|
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
|
||||||
[ -e Makefile ] && make distclean 2>/dev/null
|
[ -e Makefile ] && make distclean 2>/dev/null
|
||||||
|
|
||||||
rm -rf $MPI_ARCH_PATH
|
rm -rf $MPI_ARCH_PATH
|
||||||
|
|||||||
35
makeMesa
35
makeMesa
@ -38,20 +38,21 @@
|
|||||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
# Run from third-party directory only
|
||||||
cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
echo " Check your OpenFOAM environment and installation"
|
echo " Check your OpenFOAM environment and installation"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
. etc/tools/ThirdPartyFunctions
|
. etc/tools/ThirdPartyFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# MESA version from OpenFOAM etc/config.sh file
|
|
||||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
|
||||||
unset -f _foamAddPath _foamAddLib # get settings only
|
|
||||||
unset vtk_version mesa_version # purge current values
|
|
||||||
|
|
||||||
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/vtk)
|
unset vtk_version mesa_version # Purge current values
|
||||||
|
|
||||||
|
# mesa version from OpenFOAM etc/config.sh file:
|
||||||
|
_foamEtc config.sh/vtk
|
||||||
|
|
||||||
mesaPACKAGE=$mesa_version
|
mesaPACKAGE=$mesa_version
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
usage() {
|
usage() {
|
||||||
exec 1>&2
|
exec 1>&2
|
||||||
@ -70,27 +71,28 @@ USAGE
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Ensure configure gets the correct C/C++ compiler
|
# Compiler settings for CMake/configure
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
|
||||||
# Non-standard location for clang?
|
# Non-standard location for clang?
|
||||||
unset thirdPartyClang
|
case "$WM_COMPILER_TYPE-$WM_COMPILER" in
|
||||||
if [ "$WM_COMPILER_TYPE" = ThirdParty -a "$WM_COMPILER" = Clang ]
|
ThirdParty-Clang*)
|
||||||
then
|
|
||||||
thirdPartyClang=true
|
thirdPartyClang=true
|
||||||
fi
|
;;
|
||||||
|
*)
|
||||||
|
unset thirdPartyClang
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Parse options
|
# Parse options
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help) usage ;;
|
||||||
;;
|
|
||||||
-gcc)
|
-gcc)
|
||||||
export CC=gcc # use gcc/g++
|
useGcc
|
||||||
export CXX=g++
|
|
||||||
unset thirdPartyClang
|
unset thirdPartyClang
|
||||||
;;
|
;;
|
||||||
mesa-*)
|
mesa-*)
|
||||||
@ -171,6 +173,7 @@ adjustMESA()
|
|||||||
buildDIR=$buildBASE/$mesaPACKAGE
|
buildDIR=$buildBASE/$mesaPACKAGE
|
||||||
|
|
||||||
cd $MESA_SOURCE_DIR || exit 1
|
cd $MESA_SOURCE_DIR || exit 1
|
||||||
|
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
|
||||||
|
|
||||||
# remove any existing build
|
# remove any existing build
|
||||||
rm -rf $MESA_ARCH_PATH
|
rm -rf $MESA_ARCH_PATH
|
||||||
|
|||||||
35
makeOPENMPI
35
makeOPENMPI
@ -51,20 +51,26 @@ then
|
|||||||
fi
|
fi
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
# Run from third-party directory only
|
||||||
cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
echo " Check your OpenFOAM environment and installation"
|
echo " Check your OpenFOAM environment and installation"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
. etc/tools/ThirdPartyFunctions
|
. etc/tools/ThirdPartyFunctions
|
||||||
|
# Transition
|
||||||
|
# ~~~~~~~~~~
|
||||||
|
_foamAddLib() { true; }
|
||||||
|
_foamAddMan() { true; }
|
||||||
|
_foamAddPath() { true; }
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# get openmpi version
|
|
||||||
WM_MPLIB=OPENMPI # ensure we get the third-party settings
|
|
||||||
|
|
||||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
WM_MPLIB=OPENMPI # Ensure we get the correct MPI
|
||||||
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/mpi)
|
|
||||||
|
# openmpi version from OpenFOAM etc/config.sh file:
|
||||||
|
_foamEtc config.sh/mpi
|
||||||
|
|
||||||
mpiPACKAGE=${FOAM_MPI:-openmpi-system}
|
mpiPACKAGE=${FOAM_MPI:-openmpi-system}
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
usage() {
|
usage() {
|
||||||
exec 1>&2
|
exec 1>&2
|
||||||
@ -83,7 +89,7 @@ USAGE
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Ensure configure gets the correct C/C++ compiler
|
# Compiler settings for CMake/configure
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
|
||||||
@ -91,16 +97,10 @@ USAGE
|
|||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help) usage ;;
|
||||||
;;
|
-gcc) useGcc ;;
|
||||||
'')
|
|
||||||
# discard empty arguments
|
|
||||||
;;
|
|
||||||
-gcc)
|
|
||||||
export CC=gcc # use gcc/g++
|
|
||||||
export CXX=g++
|
|
||||||
;;
|
|
||||||
openmpi-[0-9]* | openmpi_[0-9]* | openmpi-system )
|
openmpi-[0-9]* | openmpi_[0-9]* | openmpi-system )
|
||||||
mpiPACKAGE="${1%%/}"
|
mpiPACKAGE="${1%%/}"
|
||||||
;;
|
;;
|
||||||
@ -163,6 +163,7 @@ else
|
|||||||
buildDIR=$buildBASE/$mpiPACKAGE
|
buildDIR=$buildBASE/$mpiPACKAGE
|
||||||
|
|
||||||
cd $MPI_SOURCE_DIR || exit 1
|
cd $MPI_SOURCE_DIR || exit 1
|
||||||
|
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
|
||||||
[ -e Makefile ] && make distclean 2>/dev/null
|
[ -e Makefile ] && make distclean 2>/dev/null
|
||||||
|
|
||||||
rm -rf $MPI_ARCH_PATH
|
rm -rf $MPI_ARCH_PATH
|
||||||
@ -173,9 +174,9 @@ else
|
|||||||
set -x
|
set -x
|
||||||
$MPI_SOURCE_DIR/configure \
|
$MPI_SOURCE_DIR/configure \
|
||||||
--prefix=$MPI_ARCH_PATH \
|
--prefix=$MPI_ARCH_PATH \
|
||||||
|
--libdir=$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
|
||||||
--disable-orterun-prefix-by-default \
|
--disable-orterun-prefix-by-default \
|
||||||
--enable-shared --disable-static \
|
--enable-shared --disable-static \
|
||||||
--libdir=$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
|
|
||||||
--enable-mpi-fortran=none \
|
--enable-mpi-fortran=none \
|
||||||
--disable-mpi-profile \
|
--disable-mpi-profile \
|
||||||
$configOpt \
|
$configOpt \
|
||||||
|
|||||||
83
makeParaView
83
makeParaView
@ -33,11 +33,11 @@
|
|||||||
#
|
#
|
||||||
# Note the capitalization of ParaView in the directory names.
|
# Note the capitalization of ParaView in the directory names.
|
||||||
#
|
#
|
||||||
# ------------------------------------------------
|
# ----------------------------------------------
|
||||||
# SOME USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
# Run from third-party directory only
|
||||||
cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
echo " Check your OpenFOAM environment and installation"
|
echo " Check your OpenFOAM environment and installation"
|
||||||
exit 1
|
exit 1
|
||||||
@ -45,41 +45,24 @@ cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
|||||||
. etc/tools/ThirdPartyFunctions
|
. etc/tools/ThirdPartyFunctions
|
||||||
. etc/tools/ParaViewFunctions
|
. etc/tools/ParaViewFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# ParaView_VERSION from OpenFOAM etc/config.sh file
|
|
||||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
|
||||||
unset -f _foamAddPath _foamAddLib # get settings only
|
|
||||||
unset ParaView_VERSION # purge current values
|
|
||||||
|
|
||||||
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/paraview)
|
unset ParaView_VERSION # Purge current values
|
||||||
: ${ParaView_VERSION##*-}
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# USER DEFAULTS:
|
|
||||||
# ~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
# MESA graphics support:
|
# ParaView_VERSION from etc/config.sh file:
|
||||||
withMESA=false
|
_foamEtc config.sh/paraview
|
||||||
MESA_INCLUDE="/usr/include/GL"
|
|
||||||
MESA_LIBRARY="/usr/lib$WM_COMPILER_LIB_ARCH/libOSMesa.so"
|
|
||||||
|
|
||||||
# Python support:
|
ParaView_VERSION="${ParaView_VERSION##*-}" # Without prefix
|
||||||
# - The script will try to determine the appropriate python library.
|
|
||||||
# If that fails, specify the path using the PYTHON_LIBRARY variable below.
|
# Set initial ParaView_MAJOR based on current value of ParaView_VERSION
|
||||||
withPYTHON=false
|
setParaViewVersion ${ParaView_VERSION:-none}
|
||||||
PYTHON_LIBRARY=""
|
|
||||||
# PYTHON_LIBRARY="/usr/lib$WM_COMPILER_LIB_ARCH/libpython2.7.so.1.0"
|
|
||||||
|
|
||||||
# New rendering backend (starting with paraview 5.0).
|
# New rendering backend (starting with paraview 5.0).
|
||||||
# Default to auto-config based on paraview version
|
withGL2=auto # auto-config based on version
|
||||||
withGL2=auto
|
|
||||||
|
|
||||||
#
|
#------------------------------------------------------------------------------
|
||||||
# NO FURTHER EDITING BELOW THIS LINE
|
|
||||||
#
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
usage() {
|
usage() {
|
||||||
: ${ParaView_VERSION:=none} # some dummy value for usage information
|
|
||||||
exec 1>&2
|
exec 1>&2
|
||||||
|
: ${ParaView_VERSION:=none} # some dummy value for usage information
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||||
cat<<USAGE
|
cat<<USAGE
|
||||||
|
|
||||||
@ -87,22 +70,22 @@ usage: ${0##*/} [OPTION] [paraview-VERSION] [CMAKE-OPTION]
|
|||||||
options:
|
options:
|
||||||
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||||
-rebuild for repeated builds (-make -install) *use with caution*
|
-rebuild for repeated builds (-make -install) *use with caution*
|
||||||
-gl2 with new rendering backend (if not already enabled)
|
-gl2 with new rendering backend (default: auto)
|
||||||
-mesa with mesa (if not already enabled)
|
-mesa with mesa
|
||||||
-mesa-prefix DIR location of mesa installation (sets -mesa-include, -mesa-lib)
|
-mesa-prefix DIR location of mesa installation (sets -mesa-include, -mesa-lib)
|
||||||
-mesa-include DIR location of mesa headers (current value: ${MESA_INCLUDE:-none})
|
-mesa-include DIR location of mesa headers (current: ${MESA_INCLUDE:-none})
|
||||||
-mesa-lib PATH path to mesa library (current value: ${MESA_LIBRARY:-none})
|
-mesa-lib PATH path to mesa library (current: ${MESA_LIBRARY:-none})
|
||||||
-mpi with mpi (if not already enabled)
|
-mpi with mpi
|
||||||
-mpi=N with max 'N' mpi processes. N=0 for no upper-limit.
|
-mpi=N with max 'N' mpi processes. N=0 for no upper-limit.
|
||||||
-python with python (if not already enabled)
|
-python with python
|
||||||
-python-lib PATH path to python library (current value: ${PYTHON_LIBRARY:-none})
|
-python-lib PATH path to python library (current: ${PYTHON_LIBRARY:-none})
|
||||||
-cmake PATH with cmake from the path given
|
-cmake PATH with cmake from the path given
|
||||||
-qmake PATH with the Qt version corresponding to the qmake path given
|
-qmake PATH with the Qt version corresponding to the qmake path given
|
||||||
-qt with extra Qt gui support (if not already enabled)
|
-qt with extra Qt gui support (if not already enabled)
|
||||||
-qt-VER with Qt version corresponding to
|
-qt-VER with Qt version corresponding to
|
||||||
\$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/qt-VER/bin/qmake
|
\$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/qt-VER/bin/qmake
|
||||||
-verbose verbose output in Makefiles
|
-verbose verbose output in Makefiles
|
||||||
-version VER specify an alternative version (current value: $ParaView_VERSION)
|
-version VER specify an alternative version (current: $ParaView_VERSION)
|
||||||
-major VER specify an alternative major version for special builds
|
-major VER specify an alternative major version for special builds
|
||||||
-buildType NAME specify the build type (default: Release)
|
-buildType NAME specify the build type (default: Release)
|
||||||
-suffix NAME specify a suffix to distinguish the build
|
-suffix NAME specify a suffix to distinguish the build
|
||||||
@ -138,16 +121,11 @@ USAGE
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Ensure CMake gets the correct C/C++ compiler
|
# Compiler settings for CMake/configure
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
|
||||||
# Set initial ParaView_MAJOR based on current value of ParaView_VERSION
|
|
||||||
setParaViewVersion ${ParaView_VERSION:-none}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Various building stages
|
# Various building stages
|
||||||
#
|
|
||||||
unset runPATCH runCONFIG runMAKE runINSTALL
|
unset runPATCH runCONFIG runMAKE runINSTALL
|
||||||
runDEFAULT=true
|
runDEFAULT=true
|
||||||
|
|
||||||
@ -155,19 +133,16 @@ runDEFAULT=true
|
|||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help) usage ;;
|
||||||
;;
|
-gcc) useGcc ;;
|
||||||
|
|
||||||
[0-9]* | paraview-[0-9]* | ParaView-[0-9]*) # paraview version
|
[0-9]* | paraview-[0-9]* | ParaView-[0-9]*) # paraview version
|
||||||
setParaViewVersion "${1%%/}"
|
setParaViewVersion "${1%%/}"
|
||||||
;;
|
;;
|
||||||
[A-Z]*=*) # cmake variables
|
[A-Z]*=*) # cmake variables
|
||||||
addCMakeVariable "$1"
|
addCMakeVariable "$1"
|
||||||
;;
|
;;
|
||||||
-gcc)
|
|
||||||
export CC=gcc # use gcc/g++
|
|
||||||
export CXX=g++
|
|
||||||
;;
|
|
||||||
-patch) # stage 0: patch sources
|
-patch) # stage 0: patch sources
|
||||||
runPATCH=true
|
runPATCH=true
|
||||||
unset runDEFAULT
|
unset runDEFAULT
|
||||||
@ -258,6 +233,7 @@ do
|
|||||||
;;
|
;;
|
||||||
-python-lib)
|
-python-lib)
|
||||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
withPYTHON=true
|
||||||
PYTHON_LIBRARY="${2%%/}"
|
PYTHON_LIBRARY="${2%%/}"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
@ -278,6 +254,7 @@ do
|
|||||||
withQT=false
|
withQT=false
|
||||||
;;
|
;;
|
||||||
-qt-[1-9]*)
|
-qt-[1-9]*)
|
||||||
|
withQT=true
|
||||||
QMAKE_PATH="$installBASE/${1##-}"
|
QMAKE_PATH="$installBASE/${1##-}"
|
||||||
;;
|
;;
|
||||||
-verbose)
|
-verbose)
|
||||||
@ -379,10 +356,10 @@ Features selected
|
|||||||
qt ${withQT:-false}
|
qt ${withQT:-false}
|
||||||
---------------------
|
---------------------
|
||||||
Version information
|
Version information
|
||||||
qt ${QT_VERSION:-none}
|
paraview ${ParaView_VERSION:-unknown}
|
||||||
version ${ParaView_VERSION:-unknown} $(checkVersion)
|
|
||||||
major ${ParaView_MAJOR:-unknown}
|
major ${ParaView_MAJOR:-unknown}
|
||||||
build ${BUILD_TYPE:-unknown}
|
build ${BUILD_TYPE:-unknown}
|
||||||
|
qt ${QT_VERSION:-none}
|
||||||
---------------------
|
---------------------
|
||||||
SUMMARY
|
SUMMARY
|
||||||
|
|
||||||
|
|||||||
19
makeQt
19
makeQt
@ -32,7 +32,7 @@
|
|||||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
# Run from third-party directory only
|
||||||
cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
echo " Check your OpenFOAM environment and installation"
|
echo " Check your OpenFOAM environment and installation"
|
||||||
exit 1
|
exit 1
|
||||||
@ -40,9 +40,6 @@ cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
|||||||
. etc/tools/ThirdPartyFunctions
|
. etc/tools/ThirdPartyFunctions
|
||||||
. etc/tools/QtFunctions
|
. etc/tools/QtFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
qtTYPE=qt-everywhere-opensource-src
|
|
||||||
unset qtVERSION # No default version
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
usage() {
|
usage() {
|
||||||
exec 1>&2
|
exec 1>&2
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||||
@ -59,7 +56,7 @@ USAGE
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Export WM settings in a form that GNU configure recognizes
|
# Compiler/linker settings for CMake/configure
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
|
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
|
||||||
@ -69,13 +66,10 @@ USAGE
|
|||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help) usage ;;
|
||||||
;;
|
-gcc) useGcc ;;
|
||||||
-gcc)
|
|
||||||
export CC=gcc # use gcc/g++
|
|
||||||
export CXX=g++
|
|
||||||
;;
|
|
||||||
-qt-[1-9]* | [1-9]* | qt-*)
|
-qt-[1-9]* | [1-9]* | qt-*)
|
||||||
# -qt-VERSION, VERSION, qt-VERSION, qt-everywhere-opensource-src-VERSION
|
# -qt-VERSION, VERSION, qt-VERSION, qt-everywhere-opensource-src-VERSION
|
||||||
qtVERSION="${1%%/}";
|
qtVERSION="${1%%/}";
|
||||||
@ -145,6 +139,7 @@ else
|
|||||||
buildDIR=$buildBASE/$qtPACKAGE
|
buildDIR=$buildBASE/$qtPACKAGE
|
||||||
|
|
||||||
cd $QT_SOURCE_DIR || exit 1
|
cd $QT_SOURCE_DIR || exit 1
|
||||||
|
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
|
||||||
[ -e Makefile ] && make distclean 2>/dev/null
|
[ -e Makefile ] && make distclean 2>/dev/null
|
||||||
|
|
||||||
# Remove any existing build folder and recreate
|
# Remove any existing build folder and recreate
|
||||||
|
|||||||
67
makeTecio
67
makeTecio
@ -32,7 +32,7 @@
|
|||||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
# Run from third-party directory only
|
||||||
cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
echo " Check your OpenFOAM environment and installation"
|
echo " Check your OpenFOAM environment and installation"
|
||||||
exit 1
|
exit 1
|
||||||
@ -44,15 +44,14 @@ cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
|||||||
}
|
}
|
||||||
. etc/tools/ThirdPartyFunctions
|
. etc/tools/ThirdPartyFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Boost version (headers only) from OpenFOAM etc/config.sh file
|
|
||||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
|
||||||
unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only
|
|
||||||
|
|
||||||
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL)
|
# Boost version (headers only) from OpenFOAM etc/config.sh file:
|
||||||
|
_foamEtc config.sh/CGAL
|
||||||
|
|
||||||
boostPACKAGE=${boost_version:-boost-system}
|
boostPACKAGE=${boost_version:-boost-system}
|
||||||
tecioPACKAGE=tecio
|
tecioPACKAGE=tecio
|
||||||
targetType=lib
|
targetType=lib
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
@ -66,7 +65,6 @@ options:
|
|||||||
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||||
-help
|
-help
|
||||||
|
|
||||||
|
|
||||||
* Compile the proprietary libtecio library
|
* Compile the proprietary libtecio library
|
||||||
$tecioPACKAGE
|
$tecioPACKAGE
|
||||||
with $boostPACKAGE
|
with $boostPACKAGE
|
||||||
@ -75,7 +73,7 @@ USAGE
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Ensure CMake gets the correct C/C++ compiler
|
# Compiler settings for CMake/configure
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
|
||||||
@ -83,13 +81,10 @@ USAGE
|
|||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help) usage ;;
|
||||||
;;
|
-gcc) useGcc ;;
|
||||||
-gcc)
|
|
||||||
export CC=gcc # use gcc/g++
|
|
||||||
export CXX=g++
|
|
||||||
;;
|
|
||||||
-cmake)
|
-cmake)
|
||||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
CMAKE_PATH="${2%%/}"
|
CMAKE_PATH="${2%%/}"
|
||||||
@ -108,15 +103,23 @@ do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
# assert: directory must be available
|
|
||||||
[ -d "$tecioPACKAGE" ] || die "missing source directory '$tecioPACKAGE'"
|
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
# Build TECIO library
|
||||||
#
|
#
|
||||||
|
# TECIO_SOURCE_DIR : location of the original sources
|
||||||
|
# TECIO_BUILD_DIR : location of the build
|
||||||
|
# TECIO_ARCH_PATH : location of the installed program
|
||||||
|
|
||||||
|
TECIO_SOURCE_DIR=$sourceBASE/$tecioPACKAGE/teciosrc
|
||||||
|
TECIO_BUILD_DIR=$buildBASE/$tecioPACKAGE
|
||||||
|
TECIO_ARCH_PATH=$installBASE/$tecioPACKAGE
|
||||||
|
|
||||||
|
# Sources must be available
|
||||||
|
[ -d "$TECIO_SOURCE_DIR" ] || die "Missing sources '$tecioPACKAGE'"
|
||||||
|
|
||||||
|
|
||||||
# Get Boost information
|
# Get Boost information
|
||||||
# - only headers are required
|
# - only headers are required
|
||||||
|
|
||||||
: ${BOOST_ARCH_PATH:=$installBASE/$boostPACKAGE} # Fallback
|
: ${BOOST_ARCH_PATH:=$installBASE/$boostPACKAGE} # Fallback
|
||||||
|
|
||||||
boostInc="$BOOST_ARCH_PATH/include"
|
boostInc="$BOOST_ARCH_PATH/include"
|
||||||
@ -135,27 +138,17 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Build TECIO library
|
|
||||||
#
|
|
||||||
# TECIO_SOURCE_DIR : location of the original sources
|
|
||||||
# TECIO_BINARY_DIR : location of the build
|
|
||||||
# TECIO_ARCH_PATH : location of the installed program
|
|
||||||
|
|
||||||
TECIO_SOURCE_DIR=$sourceBASE/$tecioPACKAGE/teciosrc
|
|
||||||
TECIO_BINARY_DIR=$buildBASE/$tecioPACKAGE
|
|
||||||
TECIO_ARCH_PATH=$installBASE/$tecioPACKAGE
|
|
||||||
|
|
||||||
if [ -d "$TECIO_SOURCE_DIR" ]
|
if [ -d "$TECIO_SOURCE_DIR" ]
|
||||||
then
|
then
|
||||||
(
|
(
|
||||||
# Remove any existing build folder and recreate
|
# Remove any existing build folder and recreate
|
||||||
if [ -d $TECIO_BINARY_DIR ]
|
if [ -d $TECIO_BUILD_DIR ]
|
||||||
then
|
then
|
||||||
echo "removing old build directory"
|
echo "removing old build directory"
|
||||||
echo " $TECIO_BINARY_DIR"
|
echo " $TECIO_BUILD_DIR"
|
||||||
rm -rf $TECIO_BINARY_DIR
|
rm -rf $TECIO_BUILD_DIR
|
||||||
fi
|
fi
|
||||||
mkdir -p $TECIO_BINARY_DIR
|
mkdir -p $TECIO_BUILD_DIR
|
||||||
|
|
||||||
rm -rf $TECIO_ARCH_PATH
|
rm -rf $TECIO_ARCH_PATH
|
||||||
|
|
||||||
@ -163,7 +156,7 @@ then
|
|||||||
echo "----"
|
echo "----"
|
||||||
echo "Configuring $tecioPACKAGE with boost $BOOST_VERSION"
|
echo "Configuring $tecioPACKAGE with boost $BOOST_VERSION"
|
||||||
echo " Source : $TECIO_SOURCE_DIR"
|
echo " Source : $TECIO_SOURCE_DIR"
|
||||||
echo " Build : $TECIO_BINARY_DIR"
|
echo " Build : $TECIO_BUILD_DIR"
|
||||||
echo " Target : $TECIO_ARCH_PATH"
|
echo " Target : $TECIO_ARCH_PATH"
|
||||||
|
|
||||||
if [ -d "$BOOST_ARCH_PATH" ]
|
if [ -d "$BOOST_ARCH_PATH" ]
|
||||||
@ -177,9 +170,9 @@ then
|
|||||||
|
|
||||||
echo "----"
|
echo "----"
|
||||||
set -x
|
set -x
|
||||||
cd $TECIO_BINARY_DIR && $cmake \
|
cd $TECIO_BUILD_DIR && $cmake \
|
||||||
-DCMAKE_INSTALL_PREFIX=$TECIO_ARCH_PATH \
|
-DCMAKE_INSTALL_PREFIX=$TECIO_ARCH_PATH \
|
||||||
-DCMAKE_BINARY_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DBoost_INCLUDE_DIR=$boostInc \
|
-DBoost_INCLUDE_DIR=$boostInc \
|
||||||
$TECIO_SOURCE_DIR \
|
$TECIO_SOURCE_DIR \
|
||||||
&& make -j $WM_NCOMPPROCS \
|
&& make -j $WM_NCOMPPROCS \
|
||||||
@ -189,7 +182,7 @@ then
|
|||||||
mkdir -p $TECIO_ARCH_PATH 2>/dev/null
|
mkdir -p $TECIO_ARCH_PATH 2>/dev/null
|
||||||
|
|
||||||
/bin/cp -pv \
|
/bin/cp -pv \
|
||||||
$TECIO_BINARY_DIR/libtecio.a \
|
$TECIO_BUILD_DIR/libtecio.a \
|
||||||
$TECIO_SOURCE_DIR/TECIO.h \
|
$TECIO_SOURCE_DIR/TECIO.h \
|
||||||
$TECIO_SOURCE_DIR/tecio_Exports.h \
|
$TECIO_SOURCE_DIR/tecio_Exports.h \
|
||||||
$TECIO_ARCH_PATH
|
$TECIO_ARCH_PATH
|
||||||
|
|||||||
62
makeVTK
62
makeVTK
@ -33,13 +33,13 @@
|
|||||||
# To use the VTK source from the ParaView source tree, simply make an
|
# To use the VTK source from the ParaView source tree, simply make an
|
||||||
# appropriate link first. For example,
|
# appropriate link first. For example,
|
||||||
#
|
#
|
||||||
# (cd $WM_THIRD_PARTY_DIR && ln -s ParaView-v5.2.0/VTK VTK-7.1.0)
|
# ln -s ParaView-v5.3.0/VTK VTK-7.1.0
|
||||||
#
|
#
|
||||||
# ------------------------------------------------
|
# ----------------------------------------------
|
||||||
# SOME USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
# Run from third-party directory only
|
||||||
cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
echo " Check your OpenFOAM environment and installation"
|
echo " Check your OpenFOAM environment and installation"
|
||||||
exit 1
|
exit 1
|
||||||
@ -48,31 +48,18 @@ cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
|||||||
. etc/tools/ParaViewFunctions
|
. etc/tools/ParaViewFunctions
|
||||||
. etc/tools/vtkFunctions
|
. etc/tools/vtkFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# VTK version from OpenFOAM etc/config.sh file
|
|
||||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
|
||||||
unset -f _foamAddPath _foamAddLib # get settings only
|
|
||||||
unset vtk_version mesa_version # purge current values
|
|
||||||
|
|
||||||
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/vtk)
|
unset vtk_version mesa_version # Purge current values
|
||||||
|
|
||||||
|
# vtk version from OpenFOAM etc/config.sh file:
|
||||||
|
_foamEtc config.sh/vtk
|
||||||
|
|
||||||
VTK_VERSION=$vtk_version
|
VTK_VERSION=$vtk_version
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# USER DEFAULTS:
|
|
||||||
# ~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
# MESA graphics support:
|
|
||||||
withMESA=false
|
|
||||||
MESA_INCLUDE="/usr/include/GL"
|
|
||||||
MESA_LIBRARY="/usr/lib$WM_COMPILER_LIB_ARCH/libOSMesa.so"
|
|
||||||
|
|
||||||
# New rendering backend (starting with vtk 7?).
|
# New rendering backend (starting with vtk 7?).
|
||||||
# Default to auto-config based on VTK version
|
withGL2=auto # auto-config based on version
|
||||||
withGL2=auto
|
|
||||||
|
|
||||||
#
|
#------------------------------------------------------------------------------
|
||||||
# NO FURTHER EDITING BELOW THIS LINE
|
|
||||||
#
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
usage() {
|
usage() {
|
||||||
exec 1>&2
|
exec 1>&2
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||||
@ -82,17 +69,17 @@ usage: ${0##*/} [OPTION] [vtk-VERSION] [CMAKE-OPTION]
|
|||||||
options:
|
options:
|
||||||
-gcc force g++ instead of the value from \$WM_CXX
|
-gcc force g++ instead of the value from \$WM_CXX
|
||||||
-rebuild for repeated builds (-make -install) *use with caution*
|
-rebuild for repeated builds (-make -install) *use with caution*
|
||||||
-gl2 with new rendering backend (if not already enabled)
|
-gl2 with new rendering backend (default: auto)
|
||||||
-mesa with mesa (if not already enabled)
|
-mesa with mesa (if not already enabled)
|
||||||
-mesa-prefix DIR location of mesa installation
|
-mesa-prefix DIR location of mesa installation
|
||||||
-mesa-include DIR location of mesa headers (current value: ${MESA_INCLUDE:-none})
|
-mesa-include DIR location of mesa headers (current: ${MESA_INCLUDE:-none})
|
||||||
-mesa-lib PATH path to mesa library (current value: ${MESA_LIBRARY:-none})
|
-mesa-lib PATH path to mesa library (current: ${MESA_LIBRARY:-none})
|
||||||
-osmesa with off-screen mesa only
|
-osmesa with off-screen mesa only
|
||||||
-mpi with mpi (if not already enabled)
|
-mpi with mpi
|
||||||
-mpi=N with max 'N' mpi processes. N=0 for no upper-limit.
|
-mpi=N with max 'N' mpi processes. N=0 for no upper-limit.
|
||||||
-cmake PATH with cmake from the path given
|
-cmake PATH with cmake from the path given
|
||||||
-verbose verbose output in Makefiles
|
-verbose verbose output in Makefiles
|
||||||
-version VER specify an alternative version (current value: $VTK_VERSION)
|
-version VER specify an alternative version (current: $VTK_VERSION)
|
||||||
-buildType NAME specify the build type (default: Release)
|
-buildType NAME specify the build type (default: Release)
|
||||||
-suffix NAME specify a suffix to distinguish the build
|
-suffix NAME specify a suffix to distinguish the build
|
||||||
-help
|
-help
|
||||||
@ -120,13 +107,11 @@ USAGE
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Ensure CMake gets the correct C/C++ compiler
|
# Compiler settings for CMake/configure
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
|
||||||
#
|
|
||||||
# Various building stages
|
# Various building stages
|
||||||
#
|
|
||||||
unset runPATCH runCONFIG runMAKE runINSTALL
|
unset runPATCH runCONFIG runMAKE runINSTALL
|
||||||
runDEFAULT=true
|
runDEFAULT=true
|
||||||
|
|
||||||
@ -134,19 +119,16 @@ runDEFAULT=true
|
|||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help) usage ;;
|
||||||
;;
|
-gcc) useGcc ;;
|
||||||
|
|
||||||
[0-9]* | vtk-[0-9]* | VTK-[0-9]*) # VTK version
|
[0-9]* | vtk-[0-9]* | VTK-[0-9]*) # VTK version
|
||||||
setVtkVersion "${1%%/}"
|
setVtkVersion "${1%%/}"
|
||||||
;;
|
;;
|
||||||
[A-Z]*=*) # cmake variables
|
[A-Z]*=*) # cmake variables
|
||||||
addCMakeVariable "$1"
|
addCMakeVariable "$1"
|
||||||
;;
|
;;
|
||||||
-gcc)
|
|
||||||
export CC=gcc # use gcc/g++
|
|
||||||
export CXX=g++
|
|
||||||
;;
|
|
||||||
-patch) # stage 0: patch sources
|
-patch) # stage 0: patch sources
|
||||||
runPATCH=true
|
runPATCH=true
|
||||||
unset runDEFAULT
|
unset runDEFAULT
|
||||||
@ -316,7 +298,7 @@ Features selected
|
|||||||
mpi ${withMPI:-false}
|
mpi ${withMPI:-false}
|
||||||
---------------------
|
---------------------
|
||||||
Version information
|
Version information
|
||||||
version ${VTK_VERSION:-unknown}
|
vtk ${VTK_VERSION:-unknown}
|
||||||
build ${BUILD_TYPE:-unknown}
|
build ${BUILD_TYPE:-unknown}
|
||||||
---------------------
|
---------------------
|
||||||
SUMMARY
|
SUMMARY
|
||||||
|
|||||||
4
minCmake
4
minCmake
@ -32,7 +32,7 @@
|
|||||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
# Run from third-party directory only
|
||||||
cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
echo " Check your OpenFOAM environment and installation"
|
echo " Check your OpenFOAM environment and installation"
|
||||||
exit 1
|
exit 1
|
||||||
@ -82,7 +82,7 @@ do
|
|||||||
min=$(sed -n \
|
min=$(sed -n \
|
||||||
-e 's/^.*cmake_minimum.*VERSION *\([0-9.][0-9.]*\).*/\1/p' \
|
-e 's/^.*cmake_minimum.*VERSION *\([0-9.][0-9.]*\).*/\1/p' \
|
||||||
"$dir/CMakeLists.txt" \
|
"$dir/CMakeLists.txt" \
|
||||||
2>/dev/null)
|
2>/dev/null | head -1)
|
||||||
|
|
||||||
if [ -n "$min" ]
|
if [ -n "$min" ]
|
||||||
then
|
then
|
||||||
|
|||||||
Reference in New Issue
Block a user