mirror of
https://develop.openfoam.com/Development/ThirdParty-common.git
synced 2025-12-08 06:57:50 +00:00
Merge branch 'update-master' into 'master'
Update master Update master to include stable development changes and bugfixes. See merge request !1
This commit is contained in:
69
.gitignore
vendored
69
.gitignore
vendored
@ -1,79 +1,32 @@
|
|||||||
# man gitignore for more information
|
# Ignore editor and misc backup files - anywhere
|
||||||
|
|
||||||
# editor and misc backup files - anywhere
|
|
||||||
*~
|
*~
|
||||||
.*~
|
.*~
|
||||||
*.bak
|
*.bak
|
||||||
*.bak[0-9][0-9]
|
*.bak[0-9][0-9]
|
||||||
*.orig
|
|
||||||
*.orig[0-9][0-9]
|
|
||||||
\#*\#
|
\#*\#
|
||||||
|
|
||||||
# file-browser settings - anywhere
|
# Ignore source packages - anywhere
|
||||||
.directory
|
|
||||||
|
|
||||||
# CVS recovered versions - anywhere
|
|
||||||
.#*
|
|
||||||
|
|
||||||
# objects and archives - anywhere
|
|
||||||
*.[oa]
|
|
||||||
*.la
|
|
||||||
*.so
|
|
||||||
*.jar
|
|
||||||
|
|
||||||
# derived files
|
|
||||||
lex.yy.c
|
|
||||||
|
|
||||||
# Corefiles
|
|
||||||
core
|
|
||||||
|
|
||||||
# dependency files - anywhere
|
|
||||||
*.dep
|
|
||||||
|
|
||||||
# lnInclude (symlink) folders - anywhere
|
|
||||||
lnInclude
|
|
||||||
|
|
||||||
# build folders - anywhere
|
|
||||||
linux*Gcc*/
|
|
||||||
linux*Icc*/
|
|
||||||
linuxming*/
|
|
||||||
SiCortex*Gcc*/
|
|
||||||
solaris*Gcc*/
|
|
||||||
SunOS*Gcc*/
|
|
||||||
|
|
||||||
# source packages - anywhere
|
|
||||||
*.tar.bz2
|
*.tar.bz2
|
||||||
*.tar.gz
|
*.tar.gz
|
||||||
*.tar
|
*.tar
|
||||||
*.tgz
|
*.tgz
|
||||||
*.gtgz
|
*.gtgz
|
||||||
|
|
||||||
|
# Ignore build and platforms folders
|
||||||
|
build/
|
||||||
|
platforms/
|
||||||
|
|
||||||
# ignore the persistent .build tag in the main directory
|
# Generated files in the main directory
|
||||||
/.build
|
/*.html
|
||||||
|
|
||||||
# ignore .timeStamp in the main directory
|
# Ignore unpacked sources in the main directory (match pkg-ver)
|
||||||
/.timeStamp
|
|
||||||
|
|
||||||
# ignore unpacked sources in the main directory (match pkg-ver)
|
|
||||||
# this also matches symlinks
|
# this also matches symlinks
|
||||||
/*[-_][0-9]*
|
/*[-_][0-9]*
|
||||||
|
|
||||||
# ignore all sub-directories
|
# Ignore all top-level sub-directories
|
||||||
/*/
|
/*/
|
||||||
|
|
||||||
# do not ignore these ones
|
# Do not ignore these ones though
|
||||||
!/etc/
|
!/etc/
|
||||||
|
|
||||||
# do not ignore the first level of these ones
|
# End-of-file
|
||||||
!/malloc/
|
|
||||||
/malloc/*/
|
|
||||||
!/malloc/fbsdmalloc/
|
|
||||||
|
|
||||||
# ignore these extra symlinks
|
|
||||||
libccmio
|
|
||||||
|
|
||||||
# track this patched version directly - until metis gets dropped
|
|
||||||
!/metis-5.0pre2/libmetis/metislib.h
|
|
||||||
|
|
||||||
# end-of-file
|
|
||||||
|
|||||||
111
Allclean
111
Allclean
@ -4,7 +4,7 @@
|
|||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
@ -23,7 +23,7 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# Script
|
# Script
|
||||||
# AllClean
|
# Allclean
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Clean script for third-party applications and libraries
|
# Clean script for third-party applications and libraries
|
||||||
@ -39,24 +39,115 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
|||||||
}
|
}
|
||||||
# . etc/tools/ThirdPartyFunctions
|
# . etc/tools/ThirdPartyFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
Script=${0##*/}
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
exec 1>&2
|
||||||
|
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||||
|
cat<<USAGE
|
||||||
|
Usage: $Script [OPTION] [<platform> [ ... <platformN> ]]
|
||||||
|
options:
|
||||||
|
-all remove all platforms directories.
|
||||||
|
-current clean the current platform ($WM_OPTIONS).
|
||||||
|
-help print the usage
|
||||||
|
|
||||||
# clean various packages via 'distclean'
|
Cleanup intermediate build directories.
|
||||||
for i in openmpi-*
|
Optionally remove specified platform(s) from the ThirdParty platforms
|
||||||
|
directory $WM_THIRD_PARTY_DIR/platforms
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Print help message
|
||||||
|
if [ "$1" = "-h" -o "$1" = "-help" ]; then
|
||||||
|
usage
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Clean various packages via 'distclean'
|
||||||
|
for i in openmpi-* ADIOS-*
|
||||||
do
|
do
|
||||||
[ -d "$i" ] && ( set -x; cd $i && make distclean )
|
[ -d "$i" ] && (
|
||||||
|
echo
|
||||||
|
echo "${i%/*}"
|
||||||
|
echo " make distclean"
|
||||||
|
echo
|
||||||
|
cd $i && make distclean
|
||||||
|
)
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
# clean various packages via 'realclean'
|
# Clean various packages via 'realclean'
|
||||||
for i in scotch*/src
|
for i in scotch*/src
|
||||||
do
|
do
|
||||||
[ -d "$i" ] && ( set -x; cd $i && make realclean )
|
[ -d "$i" ] && (
|
||||||
|
echo
|
||||||
|
echo "${i%/*}"
|
||||||
|
echo " make realclean"
|
||||||
|
echo
|
||||||
|
cd $i && make realclean
|
||||||
|
)
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
# clean out-of-source build directories
|
# Clean out-of-source build directories
|
||||||
[ -d platforms ] && ( set -x; rm -rf platforms/* )
|
if [ -d build ]
|
||||||
|
then
|
||||||
|
echo
|
||||||
|
echo "Clean build/ directory"
|
||||||
|
rm -rf build/*
|
||||||
|
fi
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#
|
||||||
|
# Clean platforms directories
|
||||||
|
#
|
||||||
|
if [ "$#" -ge 1 ]
|
||||||
|
then
|
||||||
|
echo
|
||||||
|
echo "Clean platforms/sub-directories"
|
||||||
|
fi
|
||||||
|
|
||||||
|
removePlatform()
|
||||||
|
{
|
||||||
|
local platform="$1"
|
||||||
|
if [ -n "$platform" -a -d "platforms/$platform" ]
|
||||||
|
then
|
||||||
|
echo
|
||||||
|
echo "Cleaning platform '$platform'"
|
||||||
|
\rm -rf "platforms/$platform"
|
||||||
|
else
|
||||||
|
echo
|
||||||
|
echo "Platform '$platform' not built"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# Optionally cleanup platforms specified from the arguments
|
||||||
|
while [ "$#" -ge 1 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
-all)
|
||||||
|
echo
|
||||||
|
echo "Removing all platforms/sub-directories"
|
||||||
|
echo
|
||||||
|
\rm -rf platforms/*
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
|
||||||
|
-current)
|
||||||
|
echo "Current platform '$WM_OPTIONS'"
|
||||||
|
removePlatform "$WM_OPTIONS"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
removePlatform "$1"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
211
Allwmake
211
Allwmake
@ -3,8 +3,8 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
@ -56,12 +56,12 @@ echo
|
|||||||
echo ========================================
|
echo ========================================
|
||||||
echo Start ThirdParty Allwmake
|
echo Start ThirdParty Allwmake
|
||||||
echo ========================================
|
echo ========================================
|
||||||
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
|
||||||
echo ========================================
|
echo ========================================
|
||||||
echo Build MPI libraries if required
|
echo Build MPI libraries if required
|
||||||
echo
|
echo " $MPI_ARCH_PATH"
|
||||||
case "$WM_MPLIB" in
|
case "$WM_MPLIB" in
|
||||||
OPENMPI)
|
OPENMPI)
|
||||||
if [ -r $MPI_ARCH_PATH/lib${WM_COMPILER_LIB_ARCH}/libmpi.so ]
|
if [ -r $MPI_ARCH_PATH/lib${WM_COMPILER_LIB_ARCH}/libmpi.so ]
|
||||||
@ -74,24 +74,34 @@ OPENMPI)
|
|||||||
echo
|
echo
|
||||||
else
|
else
|
||||||
(
|
(
|
||||||
set -x
|
# configuration options:
|
||||||
cd "${MPI_ARCH_PATH##*/}" || exit 1 # change to openmpi-VERSION
|
# Start with GridEngine support - builds without external libraries
|
||||||
|
|
||||||
make distclean 2>/dev/null
|
|
||||||
rm -rf $MPI_ARCH_PATH
|
|
||||||
|
|
||||||
# start with GridEngine support,
|
|
||||||
# it can be built without external libraries
|
|
||||||
configOpt="--with-sge"
|
configOpt="--with-sge"
|
||||||
|
|
||||||
# Infiniband support
|
# Add InfiniBand support
|
||||||
# if [ -d /usr/local/ofed -a -d /usr/local/ofed/lib64 ]
|
ibDir=/usr/local/ofed
|
||||||
# then
|
ibLib=$infbDIR/lib${WM_COMPILER_LIB_ARCH}
|
||||||
# configOpt="$configOpt --with-openib=/usr/local/ofed"
|
if [ -d "$ibDir" -a -d "$ibLib" ]
|
||||||
# configOpt="$configOpt --with-openib-libdir=/usr/local/ofed/lib64"
|
then
|
||||||
# fi
|
configOpt="$configOpt --with-verbs=$ibDir --with-verbs-lib=$ibLib"
|
||||||
|
fi
|
||||||
|
|
||||||
./configure \
|
# end of configuration options
|
||||||
|
# ----------------------------
|
||||||
|
mpiPACKAGE="${MPI_ARCH_PATH##*/}"
|
||||||
|
sourceDIR=$WM_THIRD_PARTY_DIR/$mpiPACKAGE
|
||||||
|
buildDIR=$buildBASE/$mpiPACKAGE
|
||||||
|
|
||||||
|
cd $sourceDIR || exit 1
|
||||||
|
[ -e Makefile ] && make distclean 2>/dev/null
|
||||||
|
|
||||||
|
rm -rf $MPI_ARCH_PATH
|
||||||
|
rm -rf $buildDIR
|
||||||
|
mkdir -p $buildDIR
|
||||||
|
cd $buildDIR
|
||||||
|
|
||||||
|
set -x
|
||||||
|
$sourceDIR/configure \
|
||||||
--prefix=$MPI_ARCH_PATH \
|
--prefix=$MPI_ARCH_PATH \
|
||||||
--disable-orterun-prefix-by-default \
|
--disable-orterun-prefix-by-default \
|
||||||
--enable-shared --disable-static \
|
--enable-shared --disable-static \
|
||||||
@ -99,11 +109,13 @@ OPENMPI)
|
|||||||
--enable-mpi-fortran=none \
|
--enable-mpi-fortran=none \
|
||||||
--disable-mpi-profile \
|
--disable-mpi-profile \
|
||||||
$configOpt \
|
$configOpt \
|
||||||
;
|
&& make -j $WM_NCOMPPROCS \
|
||||||
|
&& make install \
|
||||||
make -j $WM_NCOMPPROCS && make install
|
&& echo "Built: $mpiPACKAGE"
|
||||||
make distclean
|
) || {
|
||||||
)
|
echo "Error building: $mpiPACKAGE"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@ -112,19 +124,20 @@ MPICH)
|
|||||||
then
|
then
|
||||||
echo " have $WM_MPLIB shared library ($FOAM_MPI)"
|
echo " have $WM_MPLIB shared library ($FOAM_MPI)"
|
||||||
echo
|
echo
|
||||||
echo
|
|
||||||
elif [ -r $MPI_ARCH_PATH/lib/libmpich.a ]
|
elif [ -r $MPI_ARCH_PATH/lib/libmpich.a ]
|
||||||
then
|
then
|
||||||
echo " have $WM_MPLIB static library ($FOAM_MPI)"
|
echo " have $WM_MPLIB static library ($FOAM_MPI)"
|
||||||
echo
|
echo
|
||||||
else
|
else
|
||||||
(
|
(
|
||||||
|
# WARNING: unmaintained build code:
|
||||||
|
# ---------------------------------
|
||||||
set -x
|
set -x
|
||||||
cd $MPI_HOME || exit 1 # change to mpich-VERSION
|
cd $MPI_HOME || exit 1 # change to mpich-VERSION
|
||||||
|
|
||||||
make distclean 2>/dev/null
|
[ -e Makefile ] && make distclean 2>/dev/null
|
||||||
rm -rf $MPI_ARCH_PATH
|
rm -rf $MPI_ARCH_PATH
|
||||||
rm util/machines/machines.*
|
rm -rf util/machines/machines.*
|
||||||
|
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=$MPI_ARCH_PATH \
|
--prefix=$MPI_ARCH_PATH \
|
||||||
@ -172,23 +185,26 @@ MPICH)
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# building scotch is still a bit of a pain
|
||||||
|
|
||||||
# get SCOTCH_VERSION, SCOTCH_ARCH_PATH
|
# get SCOTCH_VERSION, SCOTCH_ARCH_PATH
|
||||||
if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config/scotch.sh`
|
if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/scotch)
|
||||||
then
|
then
|
||||||
. $settings
|
. $settings
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
echo "Error: no config/scotch.sh settings"
|
echo "Error: no config.sh/scotch settings"
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# building scotch is still a bit of a pain
|
echo
|
||||||
echo ========================================
|
echo ========================================
|
||||||
echo "Build Scotch decomposition library $SCOTCH_VERSION"
|
echo "Build Scotch decomposition library $SCOTCH_VERSION"
|
||||||
echo " $SCOTCH_ARCH_PATH"
|
echo " $SCOTCH_ARCH_PATH"
|
||||||
|
|
||||||
# this needs generalizing
|
# this needs generalizing
|
||||||
scotchMakefile=../../etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM-$WM_ARCH_OPTION$WM_LABEL_OPTION
|
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 \
|
||||||
-a -r $FOAM_EXT_LIBBIN/libscotch.so \
|
-a -r $FOAM_EXT_LIBBIN/libscotch.so \
|
||||||
@ -196,11 +212,11 @@ if [ -f $SCOTCH_ARCH_PATH/include/scotch.h \
|
|||||||
then
|
then
|
||||||
echo " scotch header in $SCOTCH_ARCH_PATH/include"
|
echo " scotch header in $SCOTCH_ARCH_PATH/include"
|
||||||
echo " scotch libs in $FOAM_EXT_LIBBIN"
|
echo " scotch libs in $FOAM_EXT_LIBBIN"
|
||||||
echo
|
elif [ -d "$SCOTCH_VERSION" ]
|
||||||
else
|
then
|
||||||
(
|
(
|
||||||
set -x
|
|
||||||
cd $SCOTCH_VERSION/src || exit 1
|
cd $SCOTCH_VERSION/src || exit 1
|
||||||
|
applyPatch $SCOTCH_VERSION .. # patch at parent-level
|
||||||
|
|
||||||
prefixDIR=$SCOTCH_ARCH_PATH
|
prefixDIR=$SCOTCH_ARCH_PATH
|
||||||
libDIR=$FOAM_EXT_LIBBIN
|
libDIR=$FOAM_EXT_LIBBIN
|
||||||
@ -233,23 +249,24 @@ else
|
|||||||
# cleanup, could also remove Makefile.inc
|
# cleanup, could also remove Makefile.inc
|
||||||
make realclean 2>/dev/null
|
make realclean 2>/dev/null
|
||||||
)
|
)
|
||||||
|
else
|
||||||
|
echo " Optional component (SCOTCH) was not found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# verify existence of scotch include
|
|
||||||
[ -f $SCOTCH_ARCH_PATH/include/scotch.h ] || {
|
|
||||||
echo
|
|
||||||
echo " WARNING: required include file 'scotch.h' not found!"
|
|
||||||
echo
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# build ptscotch if MPI (ThirdParty or system) is available
|
# build ptscotch if MPI (ThirdParty or system) is available
|
||||||
if [ "${FOAM_MPI:-dummy}" != dummy ]
|
# and there is a scotch include available (ie, normal scotch was built)
|
||||||
then
|
if [ "${FOAM_MPI:-dummy}" != dummy ] && \
|
||||||
echo ========================================
|
[ -f $SCOTCH_ARCH_PATH/include/scotch.h ] || \
|
||||||
echo "Build PTScotch decomposition library $SCOTCH_VERSION (uses MPI)"
|
{
|
||||||
echo " $SCOTCH_ARCH_PATH"
|
|
||||||
echo
|
echo
|
||||||
|
echo " WARNING: skipping pt-scotch - 'scotch.h' include file not found!"
|
||||||
|
false
|
||||||
|
}
|
||||||
|
then
|
||||||
|
echo
|
||||||
|
echo ========================================
|
||||||
|
echo "Build pt-scotch decomposition library $SCOTCH_VERSION (with $FOAM_MPI)"
|
||||||
|
echo " $SCOTCH_ARCH_PATH"
|
||||||
|
|
||||||
if [ -f $SCOTCH_ARCH_PATH/include/$FOAM_MPI/ptscotch.h \
|
if [ -f $SCOTCH_ARCH_PATH/include/$FOAM_MPI/ptscotch.h \
|
||||||
-a -r $FOAM_EXT_LIBBIN/$FOAM_MPI/libptscotch.so \
|
-a -r $FOAM_EXT_LIBBIN/$FOAM_MPI/libptscotch.so \
|
||||||
@ -257,9 +274,9 @@ then
|
|||||||
then
|
then
|
||||||
echo " ptscotch header in $SCOTCH_ARCH_PATH/include/$FOAM_MPI"
|
echo " ptscotch header in $SCOTCH_ARCH_PATH/include/$FOAM_MPI"
|
||||||
echo " ptscotch libs in $FOAM_EXT_LIBBIN/$FOAM_MPI"
|
echo " ptscotch libs in $FOAM_EXT_LIBBIN/$FOAM_MPI"
|
||||||
echo
|
|
||||||
else
|
else
|
||||||
(
|
(
|
||||||
|
echo
|
||||||
set -x
|
set -x
|
||||||
cd $SCOTCH_VERSION/src || exit 1
|
cd $SCOTCH_VERSION/src || exit 1
|
||||||
|
|
||||||
@ -301,19 +318,19 @@ then
|
|||||||
[ -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!"
|
||||||
echo
|
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Metis is optional
|
# Metis is optional
|
||||||
|
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/metis.sh`
|
if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/metis)
|
||||||
then
|
then
|
||||||
. $settings
|
. $settings
|
||||||
fi
|
fi
|
||||||
@ -330,39 +347,105 @@ then
|
|||||||
(
|
(
|
||||||
set -x
|
set -x
|
||||||
cd $METIS_VERSION || exit 1
|
cd $METIS_VERSION || exit 1
|
||||||
|
|
||||||
|
if [ "$WM_PRECISION_OPTION" = "DP" ]
|
||||||
|
then
|
||||||
|
FLOAT_PRECISION=64
|
||||||
|
elif [ "$WM_PRECISION_OPTION" = "SP" ]
|
||||||
|
then
|
||||||
|
FLOAT_PRECISION=32
|
||||||
|
else
|
||||||
|
echo " Metis pre-configure error:"
|
||||||
|
echo " WM_PRECISION_OPTION is neither DP nor SP"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Change user settings automatically
|
||||||
|
sed -i -e 's=\(#define IDXTYPEWIDTH\).*=\1 '$WM_LABEL_SIZE'=' \
|
||||||
|
-e 's=\(#define REALTYPEWIDTH\).*=\1 '$FLOAT_PRECISION'=' \
|
||||||
|
include/metis.h
|
||||||
|
|
||||||
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
|
||||||
cp $METIS_ARCH_PATH/lib/libmetis.so $FOAM_EXT_LIBBIN
|
cp $METIS_ARCH_PATH/lib/libmetis.so $FOAM_EXT_LIBBIN
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo " optional component Metis was not found"
|
echo " Optional component (METIS) was not found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
warnBuildIssues()
|
||||||
|
{
|
||||||
|
echo
|
||||||
|
echo " ---------------------------------------------------"
|
||||||
|
echo " Optional component ($1) had build issues"
|
||||||
|
echo " OpenFOAM will nonetheless remain largely functional"
|
||||||
|
echo " ---------------------------------------------------"
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
|
warnNotFound()
|
||||||
|
{
|
||||||
|
echo " Optional component ($1) was not found"
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# CGAL is optional
|
# CGAL is optional
|
||||||
|
echo
|
||||||
echo ========================================
|
echo ========================================
|
||||||
echo Build CGAL
|
echo Build CGAL
|
||||||
if [ -n "$CGAL_ARCH_PATH" ]
|
if [ -d "$CGAL_ARCH_PATH/include" \
|
||||||
|
-a -r "$CGAL_ARCH_PATH/lib/libCGAL.so" ]
|
||||||
then
|
then
|
||||||
(
|
# first some information about boost
|
||||||
if [ -r $CGAL_ARCH_PATH/lib/libCGAL.so ]
|
if [ -d "$BOOST_ARCH_PATH/include/boost" \
|
||||||
|
-a -r "$BOOST_ARCH_PATH/lib/libboost_system.so" ]
|
||||||
then
|
then
|
||||||
echo " CGAL headers in $CGAL_ARCH_PATH/include"
|
echo " BOOST headers in $BOOST_ARCH_PATH/include"
|
||||||
echo " CGAL libs in $CGAL_ARCH_PATH/lib"
|
echo " BOOST libs in $BOOST_ARCH_PATH/lib"
|
||||||
else
|
elif [ -d "/usr/include/boost" \
|
||||||
./makeCGAL
|
-a -r "/usr/lib${WM_COMPILER_LIB_ARCH}/libboost_system.so" ]
|
||||||
|
then
|
||||||
|
echo " BOOST headers in /usr/include"
|
||||||
|
echo " BOOST libs in /usr/lib${WM_COMPILER_LIB_ARCH}"
|
||||||
fi
|
fi
|
||||||
)
|
echo " CGAL headers in $CGAL_ARCH_PATH/include"
|
||||||
|
echo " CGAL libs in $CGAL_ARCH_PATH/lib"
|
||||||
|
elif [ -n "$CGAL_ARCH_PATH" ]
|
||||||
|
then
|
||||||
|
./makeCGAL || warnBuildIssues CGAL
|
||||||
else
|
else
|
||||||
echo " optional component was not found"
|
warnNotFound CGAL
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# FFTW is optional
|
||||||
|
echo
|
||||||
|
echo ========================================
|
||||||
|
echo Build FFTW
|
||||||
|
if [ -d "$FFTW_ARCH_PATH/include" \
|
||||||
|
-a -r "$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libfftw3.so" ]
|
||||||
|
then
|
||||||
|
echo " FFTW headers in $FFTW_ARCH_PATH/include"
|
||||||
|
echo " FFTW libs in $FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
|
||||||
|
elif [ -n "$FFTW_ARCH_PATH" ]
|
||||||
|
then
|
||||||
|
./makeFFTW || warnBuildIssues FFTW
|
||||||
|
else
|
||||||
|
warnNotFound FFTW
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo ========================================
|
echo ========================================
|
||||||
echo Done ThirdParty Allwmake
|
echo Done ThirdParty Allwmake
|
||||||
echo ========================================
|
echo ========================================
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
# ----------------------------------------------------------------- end-of-file
|
|
||||||
|
|||||||
@ -1,85 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
# ========= |
|
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
# \\ / O peration |
|
|
||||||
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
|
||||||
# \\/ M anipulation |
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
# License
|
|
||||||
# This file is part of OpenFOAM.
|
|
||||||
#
|
|
||||||
# OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
# for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
# Script
|
|
||||||
# AllwmakeLibccmio
|
|
||||||
#
|
|
||||||
# Description
|
|
||||||
# Get and build CD-adapco's ccmio library
|
|
||||||
#
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
packageDir=libccmio-2.6.1
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
# run from third-party directory only
|
|
||||||
cd ${0%/*} || exit 1
|
|
||||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
|
||||||
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
|
||||||
echo " The environment variables are inconsistent with the installation."
|
|
||||||
echo " Check the OpenFOAM entries in your dot-files and source them."
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
. etc/tools/ThirdPartyFunctions
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
usage()
|
|
||||||
{
|
|
||||||
cat<<USAGE
|
|
||||||
|
|
||||||
* The license of the libccmio library is proprietary:
|
|
||||||
|
|
||||||
Users wishing to make use of its functionality should contact CD-Adapco
|
|
||||||
for possible download and terms of use.
|
|
||||||
|
|
||||||
|
|
||||||
Usage: ${0##*/}
|
|
||||||
|
|
||||||
* This script will install the libccmio library
|
|
||||||
* After obtaining the $packageDir library, place in folder
|
|
||||||
|
|
||||||
$WM_THIRD_PARTY_DIR/$packageDir/
|
|
||||||
|
|
||||||
USAGE
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# get tar.gz file if required
|
|
||||||
if [ ! -d ${packageDir} ]
|
|
||||||
then
|
|
||||||
usage
|
|
||||||
fi
|
|
||||||
|
|
||||||
set -x
|
|
||||||
|
|
||||||
# make libccmio
|
|
||||||
(
|
|
||||||
cd $packageDir || exit 1
|
|
||||||
cpMakeFiles libccmio
|
|
||||||
|
|
||||||
wmake libso
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
|
||||||
335
README.html
335
README.html
@ -1,335 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
|
||||||
<head>
|
|
||||||
<title>OpenFOAM-3.0.x Third-Party packages</title>
|
|
||||||
<!-- 2015-11-03 Tue 17:54 -->
|
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
|
||||||
<meta name="generator" content="Org-mode" />
|
|
||||||
<style type="text/css">
|
|
||||||
<!--/*--><![CDATA[/*><!--*/
|
|
||||||
.title { text-align: center; }
|
|
||||||
.todo { font-family: monospace; color: red; }
|
|
||||||
.done { color: green; }
|
|
||||||
.tag { background-color: #eee; font-family: monospace;
|
|
||||||
padding: 2px; font-size: 80%; font-weight: normal; }
|
|
||||||
.timestamp { color: #bebebe; }
|
|
||||||
.timestamp-kwd { color: #5f9ea0; }
|
|
||||||
.right { margin-left: auto; margin-right: 0px; text-align: right; }
|
|
||||||
.left { margin-left: 0px; margin-right: auto; text-align: left; }
|
|
||||||
.center { margin-left: auto; margin-right: auto; text-align: center; }
|
|
||||||
.underline { text-decoration: underline; }
|
|
||||||
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
|
|
||||||
p.verse { margin-left: 3%; }
|
|
||||||
pre {
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
box-shadow: 3px 3px 3px #eee;
|
|
||||||
padding: 8pt;
|
|
||||||
font-family: monospace;
|
|
||||||
overflow: auto;
|
|
||||||
margin: 1.2em;
|
|
||||||
}
|
|
||||||
pre.src {
|
|
||||||
position: relative;
|
|
||||||
overflow: visible;
|
|
||||||
padding-top: 1.2em;
|
|
||||||
}
|
|
||||||
pre.src:before {
|
|
||||||
display: none;
|
|
||||||
position: absolute;
|
|
||||||
background-color: white;
|
|
||||||
top: -10px;
|
|
||||||
right: 10px;
|
|
||||||
padding: 3px;
|
|
||||||
border: 1px solid black;
|
|
||||||
}
|
|
||||||
pre.src:hover:before { display: inline;}
|
|
||||||
pre.src-sh:before { content: 'sh'; }
|
|
||||||
pre.src-bash:before { content: 'sh'; }
|
|
||||||
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
|
|
||||||
pre.src-R:before { content: 'R'; }
|
|
||||||
pre.src-perl:before { content: 'Perl'; }
|
|
||||||
pre.src-java:before { content: 'Java'; }
|
|
||||||
pre.src-sql:before { content: 'SQL'; }
|
|
||||||
|
|
||||||
table { border-collapse:collapse; }
|
|
||||||
caption.t-above { caption-side: top; }
|
|
||||||
caption.t-bottom { caption-side: bottom; }
|
|
||||||
td, th { vertical-align:top; }
|
|
||||||
th.right { text-align: center; }
|
|
||||||
th.left { text-align: center; }
|
|
||||||
th.center { text-align: center; }
|
|
||||||
td.right { text-align: right; }
|
|
||||||
td.left { text-align: left; }
|
|
||||||
td.center { text-align: center; }
|
|
||||||
dt { font-weight: bold; }
|
|
||||||
.footpara:nth-child(2) { display: inline; }
|
|
||||||
.footpara { display: block; }
|
|
||||||
.footdef { margin-bottom: 1em; }
|
|
||||||
.figure { padding: 1em; }
|
|
||||||
.figure p { text-align: center; }
|
|
||||||
.inlinetask {
|
|
||||||
padding: 10px;
|
|
||||||
border: 2px solid gray;
|
|
||||||
margin: 10px;
|
|
||||||
background: #ffffcc;
|
|
||||||
}
|
|
||||||
#org-div-home-and-up
|
|
||||||
{ text-align: right; font-size: 70%; white-space: nowrap; }
|
|
||||||
textarea { overflow-x: auto; }
|
|
||||||
.linenr { font-size: smaller }
|
|
||||||
.code-highlighted { background-color: #ffff00; }
|
|
||||||
.org-info-js_info-navigation { border-style: none; }
|
|
||||||
#org-info-js_console-label
|
|
||||||
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
|
|
||||||
.org-info-js_search-highlight
|
|
||||||
{ background-color: #ffff00; color: #000000; font-weight: bold; }
|
|
||||||
/*]]>*/-->
|
|
||||||
</style>
|
|
||||||
<script type="text/javascript">
|
|
||||||
/*
|
|
||||||
@licstart The following is the entire license notice for the
|
|
||||||
JavaScript code in this tag.
|
|
||||||
|
|
||||||
Copyright (C) 2012-2013 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
The JavaScript code in this tag is free software: you can
|
|
||||||
redistribute it and/or modify it under the terms of the GNU
|
|
||||||
General Public License (GNU GPL) as published by the Free Software
|
|
||||||
Foundation, either version 3 of the License, or (at your option)
|
|
||||||
any later version. The code is distributed WITHOUT ANY WARRANTY;
|
|
||||||
without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
||||||
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
|
|
||||||
|
|
||||||
As additional permission under GNU GPL version 3 section 7, you
|
|
||||||
may distribute non-source (e.g., minimized or compacted) forms of
|
|
||||||
that code without the copy of the GNU GPL normally required by
|
|
||||||
section 4, provided you include this license notice and a URL
|
|
||||||
through which recipients can access the Corresponding Source.
|
|
||||||
|
|
||||||
|
|
||||||
@licend The above is the entire license notice
|
|
||||||
for the JavaScript code in this tag.
|
|
||||||
*/
|
|
||||||
<!--/*--><![CDATA[/*><!--*/
|
|
||||||
function CodeHighlightOn(elem, id)
|
|
||||||
{
|
|
||||||
var target = document.getElementById(id);
|
|
||||||
if(null != target) {
|
|
||||||
elem.cacheClassElem = elem.className;
|
|
||||||
elem.cacheClassTarget = target.className;
|
|
||||||
target.className = "code-highlighted";
|
|
||||||
elem.className = "code-highlighted";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function CodeHighlightOff(elem, id)
|
|
||||||
{
|
|
||||||
var target = document.getElementById(id);
|
|
||||||
if(elem.cacheClassElem)
|
|
||||||
elem.className = elem.cacheClassElem;
|
|
||||||
if(elem.cacheClassTarget)
|
|
||||||
target.className = elem.cacheClassTarget;
|
|
||||||
}
|
|
||||||
/*]]>*///-->
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="content">
|
|
||||||
<h1 class="title">OpenFOAM-3.0.x Third-Party packages</h1>
|
|
||||||
<div id="table-of-contents">
|
|
||||||
<h2>Table of Contents</h2>
|
|
||||||
<div id="text-table-of-contents">
|
|
||||||
<ul>
|
|
||||||
<li><a href="#sec-1">1. Description</a></li>
|
|
||||||
<li><a href="#sec-2">2. Order of execution:</a>
|
|
||||||
<ul>
|
|
||||||
<li><a href="#sec-2-1">2.1. Optional</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li><a href="#sec-3">3. Versions and locations to download the third party packages</a>
|
|
||||||
<ul>
|
|
||||||
<li><a href="#sec-3-1">3.1. Gcc C++ Compiler</a></li>
|
|
||||||
<li><a href="#sec-3-2">3.2. Parallel Processing</a></li>
|
|
||||||
<li><a href="#sec-3-3">3.3. ParaView</a></li>
|
|
||||||
<li><a href="#sec-3-4">3.4. CGAL</a></li>
|
|
||||||
<li><a href="#sec-3-5">3.5. Miscellaneous</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li><a href="#sec-4">4. Notes</a>
|
|
||||||
<ul>
|
|
||||||
<li><a href="#sec-4-1">4.1. Building ParaView-4.3.1/4.4.0</a></li>
|
|
||||||
<li><a href="#sec-4-2">4.2. Building ParaView-4.1.0</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="outline-container-sec-1" class="outline-2">
|
|
||||||
<h2 id="sec-1"><span class="section-number-2">1</span> Description</h2>
|
|
||||||
<div class="outline-text-2" id="text-1">
|
|
||||||
<p>
|
|
||||||
Scripts for building third-party packages.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="outline-container-sec-2" class="outline-2">
|
|
||||||
<h2 id="sec-2"><span class="section-number-2">2</span> Order of execution:</h2>
|
|
||||||
<div class="outline-text-2" id="text-2">
|
|
||||||
<ul class="org-ul">
|
|
||||||
<li>makeGcc (recommended if the system gcc is < 4.7)
|
|
||||||
</li>
|
|
||||||
<li>Allwmake (Builds OpenMPI, Scotch etc.)
|
|
||||||
</li>
|
|
||||||
<li>makeCmake (if the system cmake version is < 2.8.8)
|
|
||||||
</li>
|
|
||||||
<li>makeParaView4
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div id="outline-container-sec-2-1" class="outline-3">
|
|
||||||
<h3 id="sec-2-1"><span class="section-number-3">2.1</span> Optional</h3>
|
|
||||||
<div class="outline-text-3" id="text-2-1">
|
|
||||||
<ul class="org-ul">
|
|
||||||
<li>AllwmakeLibccmio (Only required for conversion of STAR-CCM+ meshes)
|
|
||||||
</li>
|
|
||||||
<li>Allclean (Only required to save disk space)
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="outline-container-sec-3" class="outline-2">
|
|
||||||
<h2 id="sec-3"><span class="section-number-2">3</span> Versions and locations to download the third party packages</h2>
|
|
||||||
<div class="outline-text-2" id="text-3">
|
|
||||||
</div><div id="outline-container-sec-3-1" class="outline-3">
|
|
||||||
<h3 id="sec-3-1"><span class="section-number-3">3.1</span> Gcc C++ Compiler</h3>
|
|
||||||
<div class="outline-text-3" id="text-3-1">
|
|
||||||
<p>
|
|
||||||
The minimum version of gcc required is 4.5.0
|
|
||||||
</p>
|
|
||||||
<ul class="org-ul">
|
|
||||||
<li>gcc <a href="http://gcc.gnu.org/releases.html">http://gcc.gnu.org/releases.html</a>
|
|
||||||
</li>
|
|
||||||
<li>gmp <a href="http://gmplib.org/">http://gmplib.org/</a>
|
|
||||||
<a href="ftp://ftp.gnu.org/gnu/gmp/gmp-5.1.2.tar.bz2">ftp://ftp.gnu.org/gnu/gmp/gmp-5.1.2.tar.bz2</a>
|
|
||||||
</li>
|
|
||||||
<li>mpfr <a href="http://www.mpfr.org/">http://www.mpfr.org/</a>
|
|
||||||
<a href="ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.1.2.tar.bz2">ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.1.2.tar.bz2</a>
|
|
||||||
</li>
|
|
||||||
<li>mpc <a href="http://www.multiprecision.org/">http://www.multiprecision.org/</a>
|
|
||||||
<a href="http://www.multiprecision.org/mpc/download/mpc-1.0.1.tar.gz">http://www.multiprecision.org/mpc/download/mpc-1.0.1.tar.gz</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="outline-container-sec-3-2" class="outline-3">
|
|
||||||
<h3 id="sec-3-2"><span class="section-number-3">3.2</span> Parallel Processing</h3>
|
|
||||||
<div class="outline-text-3" id="text-3-2">
|
|
||||||
<ul class="org-ul">
|
|
||||||
<li>OpenMPI: <a href="http://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.0.tar.bz2">http://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.0.tar.bz2</a>
|
|
||||||
</li>
|
|
||||||
<li>Scotch/PtScotch: <a href="https://gforge.inria.fr/frs/download.php/file/34099/scotch_6.0.3.tar.gz">https://gforge.inria.fr/frs/download.php/file/34099/scotch_6.0.3.tar.gz</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="outline-container-sec-3-3" class="outline-3">
|
|
||||||
<h3 id="sec-3-3"><span class="section-number-3">3.3</span> ParaView</h3>
|
|
||||||
<div class="outline-text-3" id="text-3-3">
|
|
||||||
<ul class="org-ul">
|
|
||||||
<li>cmake <a href="http://www.cmake.org/files/v3.2/cmake-3.2.1.tar.gz">http://www.cmake.org/files/v3.2/cmake-3.2.1.tar.gz</a>
|
|
||||||
</li>
|
|
||||||
<li>ParaView <a href="http://www.paraview.org/files/v4.4/ParaView-v4.4.0-source.tar.gz">http://www.paraview.org/files/v4.4/ParaView-v4.4.0-source.tar.gz</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="outline-container-sec-3-4" class="outline-3">
|
|
||||||
<h3 id="sec-3-4"><span class="section-number-3">3.4</span> CGAL</h3>
|
|
||||||
<div class="outline-text-3" id="text-3-4">
|
|
||||||
<ul class="org-ul">
|
|
||||||
<li>CGAL <a href="https://github.com/CGAL/cgal/releases/download/releases/CGAL-4.7/CGAL-4.7.tar.xz">https://github.com/CGAL/cgal/releases/download/releases/CGAL-4.7/CGAL-4.7.tar.xz</a>
|
|
||||||
</li>
|
|
||||||
<li>boost <a href="http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2/download">http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2/download</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="outline-container-sec-3-5" class="outline-3">
|
|
||||||
<h3 id="sec-3-5"><span class="section-number-3">3.5</span> Miscellaneous</h3>
|
|
||||||
<div class="outline-text-3" id="text-3-5">
|
|
||||||
<ul class="org-ul">
|
|
||||||
<li>libccmio <a href="http://portal.nersc.gov/svn/visit/trunk/third_party/libccmio-2.6.1.tar.gz">http://portal.nersc.gov/svn/visit/trunk/third_party/libccmio-2.6.1.tar.gz</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="outline-container-sec-4" class="outline-2">
|
|
||||||
<h2 id="sec-4"><span class="section-number-2">4</span> Notes</h2>
|
|
||||||
<div class="outline-text-2" id="text-4">
|
|
||||||
</div><div id="outline-container-sec-4-1" class="outline-3">
|
|
||||||
<h3 id="sec-4-1"><span class="section-number-3">4.1</span> Building ParaView-4.3.1/4.4.0</h3>
|
|
||||||
<div class="outline-text-3" id="text-4-1">
|
|
||||||
<p>
|
|
||||||
The ParaView-4.3.1/4.4.0 source-pack provided by KitWare will not build and
|
|
||||||
install correctly without a minor correction: lines 653-656 must be removed
|
|
||||||
or commented from file
|
|
||||||
<i>ThirdParty-3.0.0/ParaView-4.?.?/Qt/Components/CMakeLists.txt</i> after
|
|
||||||
unpacking and renaming the ParaView-4.?.? directory. This is because the
|
|
||||||
file ui_pqExportStateWizard.h referred to in the lines 653-656:
|
|
||||||
</p>
|
|
||||||
<div class="org-src-container">
|
|
||||||
|
|
||||||
<pre class="src src-C"><span style="color: #0000cd; font-weight: bold;">if</span>(PARAVIEW_INSTALL_DEVELOPMENT_FILES)
|
|
||||||
install(FILES <span style="color: #008b00;">"${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h"</span>
|
|
||||||
DESTINATION <span style="color: #008b00;">"${VTK_INSTALL_INCLUDE_DIR}"</span>)
|
|
||||||
endif()
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
<p>
|
|
||||||
does not exist and cannot be installed causing the build and installation to
|
|
||||||
fail.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Additionally for ParaView-4.4.0 there is a bug in the STL reader which can
|
|
||||||
be patched by running the following command from within the ThirdParty-???
|
|
||||||
directory:
|
|
||||||
</p>
|
|
||||||
<ul class="org-ul">
|
|
||||||
<li>wget <a href="https://raw.githubusercontent.com/Kitware/VTK/40937e934308e5009e80769dc0c451ee4f157749/IO/Geometry/vtkSTLReader.cxx">https://raw.githubusercontent.com/Kitware/VTK/40937e934308e5009e80769dc0c451ee4f157749/IO/Geometry/vtkSTLReader.cxx</a> -O ParaView-4.4.0/VTK/IO/Geometry/vtkSTLReader.cxx
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<p>
|
|
||||||
See also <a href="http://www.openfoam.org/mantisbt/view.php?id=1887">http://www.openfoam.org/mantisbt/view.php?id=1887</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="outline-container-sec-4-2" class="outline-3">
|
|
||||||
<h3 id="sec-4-2"><span class="section-number-3">4.2</span> Building ParaView-4.1.0</h3>
|
|
||||||
<div class="outline-text-3" id="text-4-2">
|
|
||||||
<p>
|
|
||||||
On Ubuntu 14.10 and higher, OpenSuSE 13.2 and probably other recent
|
|
||||||
GNU/Linux distributions there is an issue in the GL libraries requiring a
|
|
||||||
change to the vtkXOpenGLRenderWindow.cxx file in ParaView: Uncomment line 30
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
#define GLX_GLXEXT_LEGACY
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="postamble" class="status">
|
|
||||||
<p class="date">Date: 3rd November 2015</p>
|
|
||||||
<p class="date">Created: 2015-11-03 Tue 17:54</p>
|
|
||||||
<p class="creator"><a href="http://www.gnu.org/software/emacs/">Emacs</a> 24.5 (<a href="http://orgmode.org">Org</a> mode 8.2.10)</p>
|
|
||||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
86
README.org
86
README.org
@ -1,51 +1,61 @@
|
|||||||
# -*- mode: org; -*-
|
# -*- mode: org; -*-
|
||||||
#
|
#
|
||||||
#+TITLE: OpenFOAM-3.0.x Third-Party packages
|
#+TITLE: OpenFOAM Third-Party packages
|
||||||
#+AUTHOR: The OpenFOAM Foundation
|
#+AUTHOR: The OpenFOAM Foundation / OpenCFD Ltd.
|
||||||
#+DATE: 3rd November 2015
|
#+DATE: 2016-06-28
|
||||||
#+LINK: http://www.openfoam.org
|
#+LINK: http://www.openfoam.org
|
||||||
#+OPTIONS: author:nil ^:{}
|
#+OPTIONS: author:nil ^:{}
|
||||||
# Copyright (c) 2015 OpenFOAM Foundation.
|
# Copyright (c) 2014-2016 OpenFOAM Foundation.
|
||||||
|
# Copyright (c) 2016 OpenCFD Ltd.
|
||||||
|
|
||||||
* Description
|
* Description
|
||||||
Scripts for building third-party packages.
|
Scripts for building third-party packages.
|
||||||
* Order of execution:
|
* Build Order:
|
||||||
+ makeGcc (recommended if the system gcc is < 4.7)
|
+ makeGcc (recommended if the system gcc is < 4.7)
|
||||||
+ Allwmake (Builds OpenMPI, Scotch etc.)
|
+ Allwmake (Builds OpenMPI, Scotch etc.)
|
||||||
+ makeCmake (if the system cmake version is < 2.8.8)
|
+ makeCmake (if the system cmake version is < 2.8.8)
|
||||||
+ makeParaView4
|
+ makeParaView
|
||||||
*** Optional
|
*** Optional Build Components:
|
||||||
+ AllwmakeLibccmio (Only required for conversion of STAR-CCM+ meshes)
|
+ makeLLVM (Replaces makeGcc in the above description
|
||||||
+ Allclean (Only required to save disk space)
|
- to use clang as compiler)
|
||||||
|
+ makeCCMIO (Only required for conversion of STAR-CCM+ meshes)
|
||||||
|
+ Allclean (Only required to save disk space)
|
||||||
* Versions and locations to download the third party packages
|
* Versions and locations to download the third party packages
|
||||||
*** Gcc C++ Compiler
|
*** Gcc C++ Compiler
|
||||||
The minimum version of gcc required is 4.5.0
|
The minimum version of gcc required is 4.5.0
|
||||||
+ gcc http://gcc.gnu.org/releases.html
|
+ gcc http://gcc.gnu.org/releases.html
|
||||||
+ gmp http://gmplib.org/
|
+ gmp http://gmplib.org/
|
||||||
ftp://ftp.gnu.org/gnu/gmp/gmp-5.1.2.tar.bz2
|
ftp://ftp.gnu.org/gnu/gmp/gmp-6.1.0.tar.bz2
|
||||||
+ mpfr http://www.mpfr.org/
|
+ mpfr http://www.mpfr.org/
|
||||||
ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.1.2.tar.bz2
|
ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.1.4.tar.bz2
|
||||||
+ mpc http://www.multiprecision.org/
|
+ mpc http://www.multiprecision.org/
|
||||||
http://www.multiprecision.org/mpc/download/mpc-1.0.1.tar.gz
|
ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz
|
||||||
*** Parallel Processing
|
*** Parallel Processing
|
||||||
+ OpenMPI: http://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.0.tar.bz2
|
***** Scotch
|
||||||
+ Scotch/PtScotch: https://gforge.inria.fr/frs/download.php/file/34099/scotch_6.0.3.tar.gz
|
+ Scotch/PtScotch: https://gforge.inria.fr/frs/download.php/file/34099/scotch_6.0.3.tar.gz
|
||||||
|
***** OpenMPI
|
||||||
|
+ OpenMPI: http://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.2.tar.bz2
|
||||||
*** ParaView
|
*** ParaView
|
||||||
+ cmake http://www.cmake.org/files/v3.2/cmake-3.2.1.tar.gz
|
+ cmake http://www.cmake.org/files/v3.5/cmake-3.5.2.tar.gz
|
||||||
+ ParaView http://www.paraview.org/files/v4.4/ParaView-v4.4.0-source.tar.gz
|
+ ParaView-4.4.0 http://www.paraview.org/files/v4.4/ParaView-v4.4.0-source.tar.gz
|
||||||
|
+ ParaView-5.0.1 http://www.paraview.org/files/v5.0/ParaView-v5.0.1-source.tar.gz
|
||||||
|
but may need patching to compile (See [[Notes]]).
|
||||||
*** CGAL
|
*** CGAL
|
||||||
+ CGAL https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.7/CGAL-4.7.tar.xz
|
+ CGAL https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.8/CGAL-4.8.tar.xz
|
||||||
+ boost http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2/download
|
+ CGAL https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.8.1/CGAL-4.8.1.tar.xz
|
||||||
|
+ boost https://sourceforge.net/projects/boost/files/boost/1.61.0/boost_1_61_0.tar.bz2/download
|
||||||
*** Miscellaneous
|
*** Miscellaneous
|
||||||
|
+ FFTW http://www.fftw.org/fftw-3.3.4.tar.gz
|
||||||
+ libccmio http://portal.nersc.gov/svn/visit/trunk/third_party/libccmio-2.6.1.tar.gz
|
+ libccmio http://portal.nersc.gov/svn/visit/trunk/third_party/libccmio-2.6.1.tar.gz
|
||||||
* Notes
|
* Notes
|
||||||
*** Building ParaView-4.3.1/4.4.0
|
*** Building ParaView-4.3.1/4.4.0/5.0.0/5.0.1
|
||||||
The ParaView-4.3.1/4.4.0 source-pack provided by KitWare will not build and
|
The ParaView-4.3.1/4.4.0/5.0.0 source-pack provided by KitWare will not
|
||||||
install correctly without a minor correction: lines 653-656 must be removed
|
build and install correctly without a minor correction: lines 653-656
|
||||||
or commented from file
|
(650-653 in ParaView-5.0.0, 659-662 in ParaView-5.0.1) must be removed or
|
||||||
/ThirdParty-3.0.0/ParaView-4.?.?/Qt/Components/CMakeLists.txt/ after
|
commented from file
|
||||||
unpacking and renaming the ParaView-4.?.? directory. This is because the
|
/ThirdParty-???/ParaView-[45].?.?/Qt/Components/CMakeLists.txt/ after
|
||||||
file ui_pqExportStateWizard.h referred to in the lines 653-656:
|
unpacking and renaming the ParaView-[45].?.? directory. This is because the
|
||||||
|
file ui_pqExportStateWizard.h referred to in
|
||||||
#+begin_src C
|
#+begin_src C
|
||||||
if(PARAVIEW_INSTALL_DEVELOPMENT_FILES)
|
if(PARAVIEW_INSTALL_DEVELOPMENT_FILES)
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h"
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h"
|
||||||
@ -55,12 +65,28 @@
|
|||||||
does not exist and cannot be installed causing the build and installation to
|
does not exist and cannot be installed causing the build and installation to
|
||||||
fail.
|
fail.
|
||||||
|
|
||||||
Additionally for ParaView-4.4.0 there is a bug in the STL reader which can
|
Additionally for ParaView-4.4.0 there is a bug in the STL reader.
|
||||||
be patched by running the following command from within the ThirdParty-???
|
(see http://www.openfoam.org/mantisbt/view.php?id=1887).
|
||||||
directory:
|
|
||||||
+ wget https://raw.githubusercontent.com/Kitware/VTK/40937e934308e5009e80769dc0c451ee4f157749/IO/Geometry/vtkSTLReader.cxx -O ParaView-4.4.0/VTK/IO/Geometry/vtkSTLReader.cxx
|
|
||||||
See also http://www.openfoam.org/mantisbt/view.php?id=1887
|
|
||||||
|
|
||||||
|
For ParaView-4.4.0 and ParaView-5.0.1,
|
||||||
|
the necessary patches are supplied with the ThirdParty repository
|
||||||
|
(see the etc/patches directory) and are applied when building paraview.
|
||||||
|
|
||||||
|
*** Building ParaView-5.0.1 with gcc-6.1.0
|
||||||
|
***** Add support for gcc-6.?.?
|
||||||
|
The following cmake files
|
||||||
|
+ ParaView-5.0.1/VTK/CMake/vtkCompilerExtras.cmake
|
||||||
|
+ ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake
|
||||||
|
specifically limit the gcc versions supported.
|
||||||
|
To add support gcc-6.?.? replace the '[345]' with '[3456]'.
|
||||||
|
|
||||||
|
This patch is also supplied with the ThirdParty repository and
|
||||||
|
applied when building paraview.
|
||||||
|
|
||||||
|
***** SciberQuestToolKit
|
||||||
|
The SciberQuestToolKit plugin fails to compile with gcc-6.1.0 and causes
|
||||||
|
the compilation of ParaView to halt. The easiest solution is to delete
|
||||||
|
the ParaView-5.0.1/Plugins/SciberQuestToolKit directory.
|
||||||
*** Building ParaView-4.1.0
|
*** Building ParaView-4.1.0
|
||||||
On Ubuntu 14.10 and higher, OpenSuSE 13.2 and probably other recent
|
On Ubuntu 14.10 and higher, OpenSuSE 13.2 and probably other recent
|
||||||
GNU/Linux distributions there is an issue in the GL libraries requiring a
|
GNU/Linux distributions there is an issue in the GL libraries requiring a
|
||||||
|
|||||||
543
README_scotch
Normal file
543
README_scotch
Normal file
@ -0,0 +1,543 @@
|
|||||||
|
OpenFOAM uses shared object libraries from the Scotch/PT-Scotch software:
|
||||||
|
https://www.labri.fr/perso/pelegrin/scotch/
|
||||||
|
|
||||||
|
The software is licensed under the CeCILL-C Free Software Licence
|
||||||
|
Agreement, a copy of which is reproduced below.
|
||||||
|
|
||||||
|
Please note the limitation of both the Licensor's warranty and liability
|
||||||
|
as set forth in Articles 8 and 9 of the Agreement.
|
||||||
|
|
||||||
|
If only the object libraries of Scotch are provided, the full source code
|
||||||
|
can be obtained from:
|
||||||
|
|
||||||
|
http://gforge.inria.fr/projects/scotch/
|
||||||
|
Home page of the SCOTCH project repository.
|
||||||
|
|
||||||
|
http://gforge.inria.fr/frs/?group_id=248
|
||||||
|
File download section of the SCOTCH project repository,
|
||||||
|
where source tarballs can be downloaded from.
|
||||||
|
|
||||||
|
http://gforge.inria.fr/scm/?group_id=248
|
||||||
|
Source code repository of the SCOTCH project.
|
||||||
|
|
||||||
|
http://gforge.inria.fr/docman/?group_id=248
|
||||||
|
Documentation regarding the SCOTCH project.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
CeCILL-C FREE SOFTWARE LICENSE AGREEMENT
|
||||||
|
|
||||||
|
|
||||||
|
Notice
|
||||||
|
|
||||||
|
This Agreement is a Free Software license agreement that is the result
|
||||||
|
of discussions between its authors in order to ensure compliance with
|
||||||
|
the two main principles guiding its drafting:
|
||||||
|
|
||||||
|
* firstly, compliance with the principles governing the distribution
|
||||||
|
of Free Software: access to source code, broad rights granted to
|
||||||
|
users,
|
||||||
|
* secondly, the election of a governing law, French law, with which
|
||||||
|
it is conformant, both as regards the law of torts and
|
||||||
|
intellectual property law, and the protection that it offers to
|
||||||
|
both authors and holders of the economic rights over software.
|
||||||
|
|
||||||
|
The authors of the CeCILL-C (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre])
|
||||||
|
license are:
|
||||||
|
|
||||||
|
Commissariat <20> l'Energie Atomique - CEA, a public scientific, technical
|
||||||
|
and industrial research establishment, having its principal place of
|
||||||
|
business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France.
|
||||||
|
|
||||||
|
Centre National de la Recherche Scientifique - CNRS, a public scientific
|
||||||
|
and technological establishment, having its principal place of business
|
||||||
|
at 3 rue Michel-Ange, 75794 Paris cedex 16, France.
|
||||||
|
|
||||||
|
Institut National de Recherche en Informatique et en Automatique -
|
||||||
|
INRIA, a public scientific and technological establishment, having its
|
||||||
|
principal place of business at Domaine de Voluceau, Rocquencourt, BP
|
||||||
|
105, 78153 Le Chesnay cedex, France.
|
||||||
|
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The purpose of this Free Software license agreement is to grant users
|
||||||
|
the right to modify and re-use the software governed by this license.
|
||||||
|
|
||||||
|
The exercising of this right is conditional upon the obligation to make
|
||||||
|
available to the community the modifications made to the source code of
|
||||||
|
the software so as to contribute to its evolution.
|
||||||
|
|
||||||
|
In consideration of access to the source code and the rights to copy,
|
||||||
|
modify and redistribute granted by the license, users are provided only
|
||||||
|
with a limited warranty and the software's author, the holder of the
|
||||||
|
economic rights, and the successive licensors only have limited liability.
|
||||||
|
|
||||||
|
In this respect, the risks associated with loading, using, modifying
|
||||||
|
and/or developing or reproducing the software by the user are brought to
|
||||||
|
the user's attention, given its Free Software status, which may make it
|
||||||
|
complicated to use, with the result that its use is reserved for
|
||||||
|
developers and experienced professionals having in-depth computer
|
||||||
|
knowledge. Users are therefore encouraged to load and test the
|
||||||
|
suitability of the software as regards their requirements in conditions
|
||||||
|
enabling the security of their systems and/or data to be ensured and,
|
||||||
|
more generally, to use and operate it in the same conditions of
|
||||||
|
security. This Agreement may be freely reproduced and published,
|
||||||
|
provided it is not altered, and that no provisions are either added or
|
||||||
|
removed herefrom.
|
||||||
|
|
||||||
|
This Agreement may apply to any or all software for which the holder of
|
||||||
|
the economic rights decides to submit the use thereof to its provisions.
|
||||||
|
|
||||||
|
|
||||||
|
Article 1 - DEFINITIONS
|
||||||
|
|
||||||
|
For the purpose of this Agreement, when the following expressions
|
||||||
|
commence with a capital letter, they shall have the following meaning:
|
||||||
|
|
||||||
|
Agreement: means this license agreement, and its possible subsequent
|
||||||
|
versions and annexes.
|
||||||
|
|
||||||
|
Software: means the software in its Object Code and/or Source Code form
|
||||||
|
and, where applicable, its documentation, "as is" when the Licensee
|
||||||
|
accepts the Agreement.
|
||||||
|
|
||||||
|
Initial Software: means the Software in its Source Code and possibly its
|
||||||
|
Object Code form and, where applicable, its documentation, "as is" when
|
||||||
|
it is first distributed under the terms and conditions of the Agreement.
|
||||||
|
|
||||||
|
Modified Software: means the Software modified by at least one
|
||||||
|
Integrated Contribution.
|
||||||
|
|
||||||
|
Source Code: means all the Software's instructions and program lines to
|
||||||
|
which access is required so as to modify the Software.
|
||||||
|
|
||||||
|
Object Code: means the binary files originating from the compilation of
|
||||||
|
the Source Code.
|
||||||
|
|
||||||
|
Holder: means the holder(s) of the economic rights over the Initial
|
||||||
|
Software.
|
||||||
|
|
||||||
|
Licensee: means the Software user(s) having accepted the Agreement.
|
||||||
|
|
||||||
|
Contributor: means a Licensee having made at least one Integrated
|
||||||
|
Contribution.
|
||||||
|
|
||||||
|
Licensor: means the Holder, or any other individual or legal entity, who
|
||||||
|
distributes the Software under the Agreement.
|
||||||
|
|
||||||
|
Integrated Contribution: means any or all modifications, corrections,
|
||||||
|
translations, adaptations and/or new functions integrated into the
|
||||||
|
Source Code by any or all Contributors.
|
||||||
|
|
||||||
|
Related Module: means a set of sources files including their
|
||||||
|
documentation that, without modification to the Source Code, enables
|
||||||
|
supplementary functions or services in addition to those offered by the
|
||||||
|
Software.
|
||||||
|
|
||||||
|
Derivative Software: means any combination of the Software, modified or
|
||||||
|
not, and of a Related Module.
|
||||||
|
|
||||||
|
Parties: mean both the Licensee and the Licensor.
|
||||||
|
|
||||||
|
These expressions may be used both in singular and plural form.
|
||||||
|
|
||||||
|
|
||||||
|
Article 2 - PURPOSE
|
||||||
|
|
||||||
|
The purpose of the Agreement is the grant by the Licensor to the
|
||||||
|
Licensee of a non-exclusive, transferable and worldwide license for the
|
||||||
|
Software as set forth in Article 5 hereinafter for the whole term of the
|
||||||
|
protection granted by the rights over said Software.
|
||||||
|
|
||||||
|
|
||||||
|
Article 3 - ACCEPTANCE
|
||||||
|
|
||||||
|
3.1 The Licensee shall be deemed as having accepted the terms and
|
||||||
|
conditions of this Agreement upon the occurrence of the first of the
|
||||||
|
following events:
|
||||||
|
|
||||||
|
* (i) loading the Software by any or all means, notably, by
|
||||||
|
downloading from a remote server, or by loading from a physical
|
||||||
|
medium;
|
||||||
|
* (ii) the first time the Licensee exercises any of the rights
|
||||||
|
granted hereunder.
|
||||||
|
|
||||||
|
3.2 One copy of the Agreement, containing a notice relating to the
|
||||||
|
characteristics of the Software, to the limited warranty, and to the
|
||||||
|
fact that its use is restricted to experienced users has been provided
|
||||||
|
to the Licensee prior to its acceptance as set forth in Article 3.1
|
||||||
|
hereinabove, and the Licensee hereby acknowledges that it has read and
|
||||||
|
understood it.
|
||||||
|
|
||||||
|
|
||||||
|
Article 4 - EFFECTIVE DATE AND TERM
|
||||||
|
|
||||||
|
|
||||||
|
4.1 EFFECTIVE DATE
|
||||||
|
|
||||||
|
The Agreement shall become effective on the date when it is accepted by
|
||||||
|
the Licensee as set forth in Article 3.1.
|
||||||
|
|
||||||
|
|
||||||
|
4.2 TERM
|
||||||
|
|
||||||
|
The Agreement shall remain in force for the entire legal term of
|
||||||
|
protection of the economic rights over the Software.
|
||||||
|
|
||||||
|
|
||||||
|
Article 5 - SCOPE OF RIGHTS GRANTED
|
||||||
|
|
||||||
|
The Licensor hereby grants to the Licensee, who accepts, the following
|
||||||
|
rights over the Software for any or all use, and for the term of the
|
||||||
|
Agreement, on the basis of the terms and conditions set forth hereinafter.
|
||||||
|
|
||||||
|
Besides, if the Licensor owns or comes to own one or more patents
|
||||||
|
protecting all or part of the functions of the Software or of its
|
||||||
|
components, the Licensor undertakes not to enforce the rights granted by
|
||||||
|
these patents against successive Licensees using, exploiting or
|
||||||
|
modifying the Software. If these patents are transferred, the Licensor
|
||||||
|
undertakes to have the transferees subscribe to the obligations set
|
||||||
|
forth in this paragraph.
|
||||||
|
|
||||||
|
|
||||||
|
5.1 RIGHT OF USE
|
||||||
|
|
||||||
|
The Licensee is authorized to use the Software, without any limitation
|
||||||
|
as to its fields of application, with it being hereinafter specified
|
||||||
|
that this comprises:
|
||||||
|
|
||||||
|
1. permanent or temporary reproduction of all or part of the Software
|
||||||
|
by any or all means and in any or all form.
|
||||||
|
|
||||||
|
2. loading, displaying, running, or storing the Software on any or
|
||||||
|
all medium.
|
||||||
|
|
||||||
|
3. entitlement to observe, study or test its operation so as to
|
||||||
|
determine the ideas and principles behind any or all constituent
|
||||||
|
elements of said Software. This shall apply when the Licensee
|
||||||
|
carries out any or all loading, displaying, running, transmission
|
||||||
|
or storage operation as regards the Software, that it is entitled
|
||||||
|
to carry out hereunder.
|
||||||
|
|
||||||
|
|
||||||
|
5.2 RIGHT OF MODIFICATION
|
||||||
|
|
||||||
|
The right of modification includes the right to translate, adapt,
|
||||||
|
arrange, or make any or all modifications to the Software, and the right
|
||||||
|
to reproduce the resulting software. It includes, in particular, the
|
||||||
|
right to create a Derivative Software.
|
||||||
|
|
||||||
|
The Licensee is authorized to make any or all modification to the
|
||||||
|
Software provided that it includes an explicit notice that it is the
|
||||||
|
author of said modification and indicates the date of the creation thereof.
|
||||||
|
|
||||||
|
|
||||||
|
5.3 RIGHT OF DISTRIBUTION
|
||||||
|
|
||||||
|
In particular, the right of distribution includes the right to publish,
|
||||||
|
transmit and communicate the Software to the general public on any or
|
||||||
|
all medium, and by any or all means, and the right to market, either in
|
||||||
|
consideration of a fee, or free of charge, one or more copies of the
|
||||||
|
Software by any means.
|
||||||
|
|
||||||
|
The Licensee is further authorized to distribute copies of the modified
|
||||||
|
or unmodified Software to third parties according to the terms and
|
||||||
|
conditions set forth hereinafter.
|
||||||
|
|
||||||
|
|
||||||
|
5.3.1 DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION
|
||||||
|
|
||||||
|
The Licensee is authorized to distribute true copies of the Software in
|
||||||
|
Source Code or Object Code form, provided that said distribution
|
||||||
|
complies with all the provisions of the Agreement and is accompanied by:
|
||||||
|
|
||||||
|
1. a copy of the Agreement,
|
||||||
|
|
||||||
|
2. a notice relating to the limitation of both the Licensor's
|
||||||
|
warranty and liability as set forth in Articles 8 and 9,
|
||||||
|
|
||||||
|
and that, in the event that only the Object Code of the Software is
|
||||||
|
redistributed, the Licensee allows effective access to the full Source
|
||||||
|
Code of the Software at a minimum during the entire period of its
|
||||||
|
distribution of the Software, it being understood that the additional
|
||||||
|
cost of acquiring the Source Code shall not exceed the cost of
|
||||||
|
transferring the data.
|
||||||
|
|
||||||
|
|
||||||
|
5.3.2 DISTRIBUTION OF MODIFIED SOFTWARE
|
||||||
|
|
||||||
|
When the Licensee makes an Integrated Contribution to the Software, the
|
||||||
|
terms and conditions for the distribution of the resulting Modified
|
||||||
|
Software become subject to all the provisions of this Agreement.
|
||||||
|
|
||||||
|
The Licensee is authorized to distribute the Modified Software, in
|
||||||
|
source code or object code form, provided that said distribution
|
||||||
|
complies with all the provisions of the Agreement and is accompanied by:
|
||||||
|
|
||||||
|
1. a copy of the Agreement,
|
||||||
|
|
||||||
|
2. a notice relating to the limitation of both the Licensor's
|
||||||
|
warranty and liability as set forth in Articles 8 and 9,
|
||||||
|
|
||||||
|
and that, in the event that only the object code of the Modified
|
||||||
|
Software is redistributed, the Licensee allows effective access to the
|
||||||
|
full source code of the Modified Software at a minimum during the entire
|
||||||
|
period of its distribution of the Modified Software, it being understood
|
||||||
|
that the additional cost of acquiring the source code shall not exceed
|
||||||
|
the cost of transferring the data.
|
||||||
|
|
||||||
|
|
||||||
|
5.3.3 DISTRIBUTION OF DERIVATIVE SOFTWARE
|
||||||
|
|
||||||
|
When the Licensee creates Derivative Software, this Derivative Software
|
||||||
|
may be distributed under a license agreement other than this Agreement,
|
||||||
|
subject to compliance with the requirement to include a notice
|
||||||
|
concerning the rights over the Software as defined in Article 6.4.
|
||||||
|
In the event the creation of the Derivative Software required modification
|
||||||
|
of the Source Code, the Licensee undertakes that:
|
||||||
|
|
||||||
|
1. the resulting Modified Software will be governed by this Agreement,
|
||||||
|
2. the Integrated Contributions in the resulting Modified Software
|
||||||
|
will be clearly identified and documented,
|
||||||
|
3. the Licensee will allow effective access to the source code of the
|
||||||
|
Modified Software, at a minimum during the entire period of
|
||||||
|
distribution of the Derivative Software, such that such
|
||||||
|
modifications may be carried over in a subsequent version of the
|
||||||
|
Software; it being understood that the additional cost of
|
||||||
|
purchasing the source code of the Modified Software shall not
|
||||||
|
exceed the cost of transferring the data.
|
||||||
|
|
||||||
|
|
||||||
|
5.3.4 COMPATIBILITY WITH THE CeCILL LICENSE
|
||||||
|
|
||||||
|
When a Modified Software contains an Integrated Contribution subject to
|
||||||
|
the CeCILL license agreement, or when a Derivative Software contains a
|
||||||
|
Related Module subject to the CeCILL license agreement, the provisions
|
||||||
|
set forth in the third item of Article 6.4 are optional.
|
||||||
|
|
||||||
|
|
||||||
|
Article 6 - INTELLECTUAL PROPERTY
|
||||||
|
|
||||||
|
|
||||||
|
6.1 OVER THE INITIAL SOFTWARE
|
||||||
|
|
||||||
|
The Holder owns the economic rights over the Initial Software. Any or
|
||||||
|
all use of the Initial Software is subject to compliance with the terms
|
||||||
|
and conditions under which the Holder has elected to distribute its work
|
||||||
|
and no one shall be entitled to modify the terms and conditions for the
|
||||||
|
distribution of said Initial Software.
|
||||||
|
|
||||||
|
The Holder undertakes that the Initial Software will remain ruled at
|
||||||
|
least by this Agreement, for the duration set forth in Article 4.2.
|
||||||
|
|
||||||
|
|
||||||
|
6.2 OVER THE INTEGRATED CONTRIBUTIONS
|
||||||
|
|
||||||
|
The Licensee who develops an Integrated Contribution is the owner of the
|
||||||
|
intellectual property rights over this Contribution as defined by
|
||||||
|
applicable law.
|
||||||
|
|
||||||
|
|
||||||
|
6.3 OVER THE RELATED MODULES
|
||||||
|
|
||||||
|
The Licensee who develops a Related Module is the owner of the
|
||||||
|
intellectual property rights over this Related Module as defined by
|
||||||
|
applicable law and is free to choose the type of agreement that shall
|
||||||
|
govern its distribution under the conditions defined in Article 5.3.3.
|
||||||
|
|
||||||
|
|
||||||
|
6.4 NOTICE OF RIGHTS
|
||||||
|
|
||||||
|
The Licensee expressly undertakes:
|
||||||
|
|
||||||
|
1. not to remove, or modify, in any manner, the intellectual property
|
||||||
|
notices attached to the Software;
|
||||||
|
|
||||||
|
2. to reproduce said notices, in an identical manner, in the copies
|
||||||
|
of the Software modified or not;
|
||||||
|
|
||||||
|
3. to ensure that use of the Software, its intellectual property
|
||||||
|
notices and the fact that it is governed by the Agreement is
|
||||||
|
indicated in a text that is easily accessible, specifically from
|
||||||
|
the interface of any Derivative Software.
|
||||||
|
|
||||||
|
The Licensee undertakes not to directly or indirectly infringe the
|
||||||
|
intellectual property rights of the Holder and/or Contributors on the
|
||||||
|
Software and to take, where applicable, vis-<2D>-vis its staff, any and all
|
||||||
|
measures required to ensure respect of said intellectual property rights
|
||||||
|
of the Holder and/or Contributors.
|
||||||
|
|
||||||
|
|
||||||
|
Article 7 - RELATED SERVICES
|
||||||
|
|
||||||
|
7.1 Under no circumstances shall the Agreement oblige the Licensor to
|
||||||
|
provide technical assistance or maintenance services for the Software.
|
||||||
|
|
||||||
|
However, the Licensor is entitled to offer this type of services. The
|
||||||
|
terms and conditions of such technical assistance, and/or such
|
||||||
|
maintenance, shall be set forth in a separate instrument. Only the
|
||||||
|
Licensor offering said maintenance and/or technical assistance services
|
||||||
|
shall incur liability therefor.
|
||||||
|
|
||||||
|
7.2 Similarly, any Licensor is entitled to offer to its licensees, under
|
||||||
|
its sole responsibility, a warranty, that shall only be binding upon
|
||||||
|
itself, for the redistribution of the Software and/or the Modified
|
||||||
|
Software, under terms and conditions that it is free to decide. Said
|
||||||
|
warranty, and the financial terms and conditions of its application,
|
||||||
|
shall be subject of a separate instrument executed between the Licensor
|
||||||
|
and the Licensee.
|
||||||
|
|
||||||
|
|
||||||
|
Article 8 - LIABILITY
|
||||||
|
|
||||||
|
8.1 Subject to the provisions of Article 8.2, the Licensee shall be
|
||||||
|
entitled to claim compensation for any direct loss it may have suffered
|
||||||
|
from the Software as a result of a fault on the part of the relevant
|
||||||
|
Licensor, subject to providing evidence thereof.
|
||||||
|
|
||||||
|
8.2 The Licensor's liability is limited to the commitments made under
|
||||||
|
this Agreement and shall not be incurred as a result of in particular:
|
||||||
|
(i) loss due the Licensee's total or partial failure to fulfill its
|
||||||
|
obligations, (ii) direct or consequential loss that is suffered by the
|
||||||
|
Licensee due to the use or performance of the Software, and (iii) more
|
||||||
|
generally, any consequential loss. In particular the Parties expressly
|
||||||
|
agree that any or all pecuniary or business loss (i.e. loss of data,
|
||||||
|
loss of profits, operating loss, loss of customers or orders,
|
||||||
|
opportunity cost, any disturbance to business activities) or any or all
|
||||||
|
legal proceedings instituted against the Licensee by a third party,
|
||||||
|
shall constitute consequential loss and shall not provide entitlement to
|
||||||
|
any or all compensation from the Licensor.
|
||||||
|
|
||||||
|
|
||||||
|
Article 9 - WARRANTY
|
||||||
|
|
||||||
|
9.1 The Licensee acknowledges that the scientific and technical
|
||||||
|
state-of-the-art when the Software was distributed did not enable all
|
||||||
|
possible uses to be tested and verified, nor for the presence of
|
||||||
|
possible defects to be detected. In this respect, the Licensee's
|
||||||
|
attention has been drawn to the risks associated with loading, using,
|
||||||
|
modifying and/or developing and reproducing the Software which are
|
||||||
|
reserved for experienced users.
|
||||||
|
|
||||||
|
The Licensee shall be responsible for verifying, by any or all means,
|
||||||
|
the suitability of the product for its requirements, its good working
|
||||||
|
order, and for ensuring that it shall not cause damage to either persons
|
||||||
|
or properties.
|
||||||
|
|
||||||
|
9.2 The Licensor hereby represents, in good faith, that it is entitled
|
||||||
|
to grant all the rights over the Software (including in particular the
|
||||||
|
rights set forth in Article 5).
|
||||||
|
|
||||||
|
9.3 The Licensee acknowledges that the Software is supplied "as is" by
|
||||||
|
the Licensor without any other express or tacit warranty, other than
|
||||||
|
that provided for in Article 9.2 and, in particular, without any warranty
|
||||||
|
as to its commercial value, its secured, safe, innovative or relevant
|
||||||
|
nature.
|
||||||
|
|
||||||
|
Specifically, the Licensor does not warrant that the Software is free
|
||||||
|
from any error, that it will operate without interruption, that it will
|
||||||
|
be compatible with the Licensee's own equipment and software
|
||||||
|
configuration, nor that it will meet the Licensee's requirements.
|
||||||
|
|
||||||
|
9.4 The Licensor does not either expressly or tacitly warrant that the
|
||||||
|
Software does not infringe any third party intellectual property right
|
||||||
|
relating to a patent, software or any other property right. Therefore,
|
||||||
|
the Licensor disclaims any and all liability towards the Licensee
|
||||||
|
arising out of any or all proceedings for infringement that may be
|
||||||
|
instituted in respect of the use, modification and redistribution of the
|
||||||
|
Software. Nevertheless, should such proceedings be instituted against
|
||||||
|
the Licensee, the Licensor shall provide it with technical and legal
|
||||||
|
assistance for its defense. Such technical and legal assistance shall be
|
||||||
|
decided on a case-by-case basis between the relevant Licensor and the
|
||||||
|
Licensee pursuant to a memorandum of understanding. The Licensor
|
||||||
|
disclaims any and all liability as regards the Licensee's use of the
|
||||||
|
name of the Software. No warranty is given as regards the existence of
|
||||||
|
prior rights over the name of the Software or as regards the existence
|
||||||
|
of a trademark.
|
||||||
|
|
||||||
|
|
||||||
|
Article 10 - TERMINATION
|
||||||
|
|
||||||
|
10.1 In the event of a breach by the Licensee of its obligations
|
||||||
|
hereunder, the Licensor may automatically terminate this Agreement
|
||||||
|
thirty (30) days after notice has been sent to the Licensee and has
|
||||||
|
remained ineffective.
|
||||||
|
|
||||||
|
10.2 A Licensee whose Agreement is terminated shall no longer be
|
||||||
|
authorized to use, modify or distribute the Software. However, any
|
||||||
|
licenses that it may have granted prior to termination of the Agreement
|
||||||
|
shall remain valid subject to their having been granted in compliance
|
||||||
|
with the terms and conditions hereof.
|
||||||
|
|
||||||
|
|
||||||
|
Article 11 - MISCELLANEOUS
|
||||||
|
|
||||||
|
|
||||||
|
11.1 EXCUSABLE EVENTS
|
||||||
|
|
||||||
|
Neither Party shall be liable for any or all delay, or failure to
|
||||||
|
perform the Agreement, that may be attributable to an event of force
|
||||||
|
majeure, an act of God or an outside cause, such as defective
|
||||||
|
functioning or interruptions of the electricity or telecommunications
|
||||||
|
networks, network paralysis following a virus attack, intervention by
|
||||||
|
government authorities, natural disasters, water damage, earthquakes,
|
||||||
|
fire, explosions, strikes and labor unrest, war, etc.
|
||||||
|
|
||||||
|
11.2 Any failure by either Party, on one or more occasions, to invoke
|
||||||
|
one or more of the provisions hereof, shall under no circumstances be
|
||||||
|
interpreted as being a waiver by the interested Party of its right to
|
||||||
|
invoke said provision(s) subsequently.
|
||||||
|
|
||||||
|
11.3 The Agreement cancels and replaces any or all previous agreements,
|
||||||
|
whether written or oral, between the Parties and having the same
|
||||||
|
purpose, and constitutes the entirety of the agreement between said
|
||||||
|
Parties concerning said purpose. No supplement or modification to the
|
||||||
|
terms and conditions hereof shall be effective as between the Parties
|
||||||
|
unless it is made in writing and signed by their duly authorized
|
||||||
|
representatives.
|
||||||
|
|
||||||
|
11.4 In the event that one or more of the provisions hereof were to
|
||||||
|
conflict with a current or future applicable act or legislative text,
|
||||||
|
said act or legislative text shall prevail, and the Parties shall make
|
||||||
|
the necessary amendments so as to comply with said act or legislative
|
||||||
|
text. All other provisions shall remain effective. Similarly, invalidity
|
||||||
|
of a provision of the Agreement, for any reason whatsoever, shall not
|
||||||
|
cause the Agreement as a whole to be invalid.
|
||||||
|
|
||||||
|
|
||||||
|
11.5 LANGUAGE
|
||||||
|
|
||||||
|
The Agreement is drafted in both French and English and both versions
|
||||||
|
are deemed authentic.
|
||||||
|
|
||||||
|
|
||||||
|
Article 12 - NEW VERSIONS OF THE AGREEMENT
|
||||||
|
|
||||||
|
12.1 Any person is authorized to duplicate and distribute copies of this
|
||||||
|
Agreement.
|
||||||
|
|
||||||
|
12.2 So as to ensure coherence, the wording of this Agreement is
|
||||||
|
protected and may only be modified by the authors of the License, who
|
||||||
|
reserve the right to periodically publish updates or new versions of the
|
||||||
|
Agreement, each with a separate number. These subsequent versions may
|
||||||
|
address new issues encountered by Free Software.
|
||||||
|
|
||||||
|
12.3 Any Software distributed under a given version of the Agreement may
|
||||||
|
only be subsequently distributed under the same version of the Agreement
|
||||||
|
or a subsequent version.
|
||||||
|
|
||||||
|
|
||||||
|
Article 13 - GOVERNING LAW AND JURISDICTION
|
||||||
|
|
||||||
|
13.1 The Agreement is governed by French law. The Parties agree to
|
||||||
|
endeavor to seek an amicable solution to any disagreements or disputes
|
||||||
|
that may arise during the performance of the Agreement.
|
||||||
|
|
||||||
|
13.2 Failing an amicable solution within two (2) months as from their
|
||||||
|
occurrence, and unless emergency proceedings are necessary, the
|
||||||
|
disagreements or disputes shall be referred to the Paris Courts having
|
||||||
|
jurisdiction, by the more diligent Party.
|
||||||
|
|
||||||
|
|
||||||
|
Version 1.0 dated 2006-09-05.
|
||||||
13
etc/patches/mkdiff-paraview-5.0.1
Normal file
13
etc/patches/mkdiff-paraview-5.0.1
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# simple script to generate patches
|
||||||
|
paraview=ParaView-5.0.1
|
||||||
|
|
||||||
|
for i in \
|
||||||
|
$paraview/VTK/CMake/vtkCompilerExtras.cmake \
|
||||||
|
$paraview/VTK/CMake/GenerateExportHeader.cmake \
|
||||||
|
$paraview/Qt/Components/CMakeLists.txt \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
diff -uw $i.orig $i
|
||||||
|
done
|
||||||
50
etc/patches/paraview-4.4.0
Normal file
50
etc/patches/paraview-4.4.0
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
--- ParaView-4.4.0/VTK/IO/Geometry/vtkSTLReader.cxx.orig 2015-09-11 19:59:24.000000000 +0200
|
||||||
|
+++ ParaView-4.4.0/VTK/IO/Geometry/vtkSTLReader.cxx 2016-06-19 12:59:50.769770143 +0200
|
||||||
|
@@ -448,7 +448,7 @@
|
||||||
|
done = done || (fscanf(fp,"%s", line)==EOF);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- if (!done)
|
||||||
|
+ else if (!done)
|
||||||
|
{
|
||||||
|
done = (fgets(line, 255, fp) == 0);
|
||||||
|
lineCount++;
|
||||||
|
--- ParaView-5.0.1/VTK/CMake/vtkCompilerExtras.cmake.orig 2016-03-28 17:07:10.000000000 +0200
|
||||||
|
+++ ParaView-5.0.1/VTK/CMake/vtkCompilerExtras.cmake 2016-06-11 15:10:14.820958942 +0200
|
||||||
|
@@ -32,7 +32,7 @@
|
||||||
|
OUTPUT_VARIABLE _gcc_version_info
|
||||||
|
ERROR_VARIABLE _gcc_version_info)
|
||||||
|
|
||||||
|
- string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]*"
|
||||||
|
+ string (REGEX MATCH "[3-6]\\.[0-9]\\.[0-9]*"
|
||||||
|
_gcc_version "${_gcc_version_info}")
|
||||||
|
if(NOT _gcc_version)
|
||||||
|
string (REGEX REPLACE ".*\\(GCC\\).*([34]\\.[0-9]).*" "\\1.0"
|
||||||
|
--- ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake.orig 2016-03-28 17:07:10.000000000 +0200
|
||||||
|
+++ ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake 2016-06-11 15:12:16.344357746 +0200
|
||||||
|
@@ -166,7 +166,7 @@
|
||||||
|
execute_process(COMMAND ${CMAKE_C_COMPILER} ARGS --version
|
||||||
|
OUTPUT_VARIABLE _gcc_version_info
|
||||||
|
ERROR_VARIABLE _gcc_version_info)
|
||||||
|
- string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]*"
|
||||||
|
+ string(REGEX MATCH "[3-6]\\.[0-9]\\.[0-9]*"
|
||||||
|
_gcc_version "${_gcc_version_info}")
|
||||||
|
# gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
|
||||||
|
# patch level, handle this here:
|
||||||
|
--- ParaView-5.0.1/Qt/Components/CMakeLists.txt.orig 2016-06-13 09:27:27.827849525 +0200
|
||||||
|
+++ ParaView-5.0.1/Qt/Components/CMakeLists.txt 2016-06-13 09:29:28.599318445 +0200
|
||||||
|
@@ -656,10 +656,10 @@
|
||||||
|
#the pqSGExportStateWizard has subclasses that directly access
|
||||||
|
#the UI file, and currently we don't have a clean way to break this hard
|
||||||
|
#dependency, so for no we install this ui file.
|
||||||
|
-if(PARAVIEW_INSTALL_DEVELOPMENT_FILES)
|
||||||
|
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h"
|
||||||
|
- DESTINATION "${VTK_INSTALL_INCLUDE_DIR}")
|
||||||
|
-endif()
|
||||||
|
+#OPENFOAM patch#if(PARAVIEW_INSTALL_DEVELOPMENT_FILES)
|
||||||
|
+#OPENFOAM patch# install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h"
|
||||||
|
+#OPENFOAM patch# DESTINATION "${VTK_INSTALL_INCLUDE_DIR}")
|
||||||
|
+#OPENFOAM patch#endif()
|
||||||
|
|
||||||
|
#IF (NOT PV_INSTALL_NO_DEVELOPMENT)
|
||||||
|
# # Headers
|
||||||
39
etc/patches/paraview-5.0.1
Normal file
39
etc/patches/paraview-5.0.1
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
--- ParaView-5.0.1/VTK/CMake/vtkCompilerExtras.cmake.orig 2016-03-28 17:07:10.000000000 +0200
|
||||||
|
+++ ParaView-5.0.1/VTK/CMake/vtkCompilerExtras.cmake 2016-06-11 15:10:14.820958942 +0200
|
||||||
|
@@ -32,7 +32,7 @@
|
||||||
|
OUTPUT_VARIABLE _gcc_version_info
|
||||||
|
ERROR_VARIABLE _gcc_version_info)
|
||||||
|
|
||||||
|
- string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]*"
|
||||||
|
+ string (REGEX MATCH "[3-6]\\.[0-9]\\.[0-9]*"
|
||||||
|
_gcc_version "${_gcc_version_info}")
|
||||||
|
if(NOT _gcc_version)
|
||||||
|
string (REGEX REPLACE ".*\\(GCC\\).*([34]\\.[0-9]).*" "\\1.0"
|
||||||
|
--- ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake.orig 2016-03-28 17:07:10.000000000 +0200
|
||||||
|
+++ ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake 2016-06-11 15:12:16.344357746 +0200
|
||||||
|
@@ -166,7 +166,7 @@
|
||||||
|
execute_process(COMMAND ${CMAKE_C_COMPILER} ARGS --version
|
||||||
|
OUTPUT_VARIABLE _gcc_version_info
|
||||||
|
ERROR_VARIABLE _gcc_version_info)
|
||||||
|
- string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]*"
|
||||||
|
+ string(REGEX MATCH "[3-6]\\.[0-9]\\.[0-9]*"
|
||||||
|
_gcc_version "${_gcc_version_info}")
|
||||||
|
# gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
|
||||||
|
# patch level, handle this here:
|
||||||
|
--- ParaView-5.0.1/Qt/Components/CMakeLists.txt.orig 2016-06-13 09:27:27.827849525 +0200
|
||||||
|
+++ ParaView-5.0.1/Qt/Components/CMakeLists.txt 2016-06-13 09:29:28.599318445 +0200
|
||||||
|
@@ -656,10 +656,10 @@
|
||||||
|
#the pqSGExportStateWizard has subclasses that directly access
|
||||||
|
#the UI file, and currently we don't have a clean way to break this hard
|
||||||
|
#dependency, so for no we install this ui file.
|
||||||
|
-if(PARAVIEW_INSTALL_DEVELOPMENT_FILES)
|
||||||
|
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h"
|
||||||
|
- DESTINATION "${VTK_INSTALL_INCLUDE_DIR}")
|
||||||
|
-endif()
|
||||||
|
+#OPENFOAM patch#if(PARAVIEW_INSTALL_DEVELOPMENT_FILES)
|
||||||
|
+#OPENFOAM patch# install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h"
|
||||||
|
+#OPENFOAM patch# DESTINATION "${VTK_INSTALL_INCLUDE_DIR}")
|
||||||
|
+#OPENFOAM patch#endif()
|
||||||
|
|
||||||
|
#IF (NOT PV_INSTALL_NO_DEVELOPMENT)
|
||||||
|
# # Headers
|
||||||
17
etc/patches/paraview-5.1.0
Normal file
17
etc/patches/paraview-5.1.0
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
--- ParaView-5.1.0/Qt/Components/CMakeLists.txt.orig 2016-06-13 09:27:27.827849525 +0200
|
||||||
|
+++ ParaView-5.1.0/Qt/Components/CMakeLists.txt 2016-06-13 09:29:28.599318445 +0200
|
||||||
|
@@ -656,10 +656,10 @@
|
||||||
|
#the pqSGExportStateWizard has subclasses that directly access
|
||||||
|
#the UI file, and currently we don't have a clean way to break this hard
|
||||||
|
#dependency, so for no we install this ui file.
|
||||||
|
-if(PARAVIEW_INSTALL_DEVELOPMENT_FILES)
|
||||||
|
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h"
|
||||||
|
- DESTINATION "${VTK_INSTALL_INCLUDE_DIR}")
|
||||||
|
-endif()
|
||||||
|
+#OPENFOAM patch#if(PARAVIEW_INSTALL_DEVELOPMENT_FILES)
|
||||||
|
+#OPENFOAM patch# install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h"
|
||||||
|
+#OPENFOAM patch# DESTINATION "${VTK_INSTALL_INCLUDE_DIR}")
|
||||||
|
+#OPENFOAM patch#endif()
|
||||||
|
|
||||||
|
#IF (NOT PV_INSTALL_NO_DEVELOPMENT)
|
||||||
|
# # Headers
|
||||||
10
etc/patches/scotch_6.0.4
Normal file
10
etc/patches/scotch_6.0.4
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- scotch_6.0.4/src/libscotch/common.h.orig 2015-03-01 10:14:02.000000000 +0100
|
||||||
|
+++ scotch_6.0.4/src/libscotch/common.h 2016-06-16 09:23:00.314985888 +0200
|
||||||
|
@@ -306,6 +306,8 @@
|
||||||
|
ThreadLaunchStartFunc stafptr; /*+ Pointer to start routine +*/
|
||||||
|
ThreadLaunchJoinFunc joifptr; /*+ Pointer to join routine +*/
|
||||||
|
ThreadBarrier barrdat; /*+ Barrier data structure +*/
|
||||||
|
+#else
|
||||||
|
+ int thrdnbr; /* dummy for non-threaded */
|
||||||
|
#endif /* ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD)) */
|
||||||
|
} ThreadGroupHeader;
|
||||||
@ -69,17 +69,16 @@ do
|
|||||||
;;
|
;;
|
||||||
-f | -force)
|
-f | -force)
|
||||||
forceOpt=true
|
forceOpt=true
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
[1-9]* | qt-[1-9]*)
|
[1-9]* | qt-[1-9]*)
|
||||||
qtVERSION="${1%%/}";
|
qtVERSION="${1%%/}";
|
||||||
qtVERSION="${qtVERSION#qt-}"
|
qtVERSION="${qtVERSION#qt-}"
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage "unknown option/argument: '$*'"
|
die "unknown option/argument: '$1'"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
@ -32,14 +32,14 @@
|
|||||||
# buildBASE, installBASE defined from tools/ThirdPartyFunctions
|
# buildBASE, installBASE defined from tools/ThirdPartyFunctions
|
||||||
|
|
||||||
#
|
#
|
||||||
# where things are or should be put
|
# Where things are or should be put
|
||||||
# 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_BINARY_DIR : location of the build
|
||||||
# ParaView_DIR : location of the installed program
|
# ParaView_DIR : location of the installed program
|
||||||
#
|
#
|
||||||
setDirs()
|
setParaViewDirs()
|
||||||
{
|
{
|
||||||
ParaView_SOURCE_DIR=$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION
|
ParaView_SOURCE_DIR=$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION
|
||||||
|
|
||||||
@ -51,10 +51,10 @@ setDirs()
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION-$OBJ_ADD
|
# ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION${OBJ_ADD:+-$OBJ_ADD}
|
||||||
ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION
|
ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION
|
||||||
|
|
||||||
# ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION-$OBJ_ADD
|
# ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION${OBJ_ADD:+-$OBJ_ADD}
|
||||||
ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION
|
ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION
|
||||||
|
|
||||||
export ParaView_SOURCE_DIR ParaView_BINARY_DIR ParaView_DIR
|
export ParaView_SOURCE_DIR ParaView_BINARY_DIR ParaView_DIR
|
||||||
@ -63,17 +63,27 @@ setDirs()
|
|||||||
echo "ParaView_SOURCE_DIR=$ParaView_SOURCE_DIR"
|
echo "ParaView_SOURCE_DIR=$ParaView_SOURCE_DIR"
|
||||||
echo "ParaView_BINARY_DIR=$ParaView_BINARY_DIR"
|
echo "ParaView_BINARY_DIR=$ParaView_BINARY_DIR"
|
||||||
echo "ParaView_DIR=$ParaView_DIR"
|
echo "ParaView_DIR=$ParaView_DIR"
|
||||||
|
|
||||||
|
# Forcefully override the .git path for the ParaView source code directory
|
||||||
|
export GIT_DIR=$ParaView_SOURCE_DIR/.git
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# set ParaView_VERSION and adjust ParaView_MAJOR accordingly
|
# Set ParaView_VERSION and adjust ParaView_MAJOR accordingly
|
||||||
#
|
#
|
||||||
setVersion()
|
# $1 can contain something something like 4.4.0, paraview-4.4.0, ParaView-4.0.0
|
||||||
|
#
|
||||||
|
setParaViewVersion()
|
||||||
{
|
{
|
||||||
[ "$#" -ge 1 ] && ParaView_VERSION="${1##paraview-}"
|
[ $# -gt 0 ] || {
|
||||||
|
echo "Error: function setParaViewVersion() called without an argument"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
# the major version is "<digits>.<digits>"
|
ParaView_VERSION="${1##*-}"
|
||||||
|
|
||||||
|
# The major version is "<digits>.<digits>"
|
||||||
ParaView_MAJOR=$(echo $ParaView_VERSION | \
|
ParaView_MAJOR=$(echo $ParaView_VERSION | \
|
||||||
sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/')
|
sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/')
|
||||||
|
|
||||||
@ -84,58 +94,27 @@ setVersion()
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
#
|
#
|
||||||
# extract and echo date stamp information from
|
# Compare version information (specified vs what is found in CMakeLists.txt)
|
||||||
# VTK/Utilities/kwsys/kwsysDateStamp.cmake
|
# Parse this type of content:
|
||||||
# since the order of the entries is already correct, can use simple sed script
|
# set (PARAVIEW_VERSION_FULL "3.98.1")
|
||||||
#
|
|
||||||
echoDateStamp()
|
|
||||||
{
|
|
||||||
(
|
|
||||||
set -- $(
|
|
||||||
sed -ne 's/^SET(KWSYS_DATE_STAMP_[A-Z]*\([ 0-9]*\)).*$/\1/p' \
|
|
||||||
$ParaView_SOURCE_DIR/VTK/Utilities/kwsys/kwsysDateStamp.cmake
|
|
||||||
)
|
|
||||||
|
|
||||||
IFS='-'
|
|
||||||
echo "date-stamp: $*"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# extract version information from
|
|
||||||
# CMakeLists.txt
|
|
||||||
# since the order of the entries is already correct, can use simple sed script
|
|
||||||
#
|
|
||||||
getVersion()
|
|
||||||
{
|
|
||||||
(
|
|
||||||
set -- $(
|
|
||||||
sed -ne 's/^SET(PARAVIEW_VERSION_[A-Z]*\([ 0-9]*\)).*$/\1/p' \
|
|
||||||
$ParaView_SOURCE_DIR/CMakeLists.txt
|
|
||||||
)
|
|
||||||
|
|
||||||
IFS='.'
|
|
||||||
echo "$*"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# compare version information
|
|
||||||
#
|
#
|
||||||
checkVersion()
|
checkVersion()
|
||||||
{
|
{
|
||||||
local ver=$(getVersion)
|
local ver=$(
|
||||||
|
sed -ne 's/^ *set *( *PARAVIEW_VERSION_FULL[ "]*\([.0-9]*\).*$/\1/ip' \
|
||||||
|
$ParaView_SOURCE_DIR/CMakeLists.txt
|
||||||
|
)
|
||||||
|
|
||||||
if [ "$ParaView_VERSION" != "$ver" ]
|
if [ "$ParaView_VERSION" != "$ver" ]
|
||||||
then
|
then
|
||||||
echo "MISMATCH!"
|
echo "MISMATCH!"
|
||||||
echo " specified $ParaView_VERSION"
|
echo " specified $ParaView_VERSION"
|
||||||
echo " found $ver"
|
echo " found ${ver:-NONE}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# set CMake cache variables
|
# Set CMake cache variables
|
||||||
#
|
#
|
||||||
addCMakeVariable()
|
addCMakeVariable()
|
||||||
{
|
{
|
||||||
@ -148,20 +127,27 @@ addCMakeVariable()
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# verbose makefiles
|
# Verbose makefiles
|
||||||
#
|
#
|
||||||
addVerbosity()
|
addVerbosity()
|
||||||
{
|
{
|
||||||
[ "$withVERBOSE" = true ] && addCMakeVariable "CMAKE_VERBOSE_MAKEFILE=TRUE"
|
if [ "${withVERBOSE:=false}" = true ]
|
||||||
|
then
|
||||||
|
addCMakeVariable "CMAKE_VERBOSE_MAKEFILE=TRUE"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# define options for mpi support
|
# Define options for mpi support
|
||||||
#
|
#
|
||||||
addMpiSupport()
|
addMpiSupport()
|
||||||
{
|
{
|
||||||
[ "${withMPI:=false}" = true ] || return
|
if [ "${withMPI:=false}" != true ]
|
||||||
|
then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
OBJ_ADD="$OBJ_ADD-mpi"
|
OBJ_ADD="$OBJ_ADD-mpi"
|
||||||
|
|
||||||
addCMakeVariable "PARAVIEW_USE_MPI=ON VTK_USE_MPI=ON"
|
addCMakeVariable "PARAVIEW_USE_MPI=ON VTK_USE_MPI=ON"
|
||||||
@ -170,18 +156,22 @@ addMpiSupport()
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# define options for python support
|
# Define options for python support
|
||||||
#
|
#
|
||||||
addPythonSupport()
|
addPythonSupport()
|
||||||
{
|
{
|
||||||
[ "${withPYTHON:=false}" = true ] || return
|
if [ "${withPYTHON:=false}" != true ]
|
||||||
|
then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
OBJ_ADD="$OBJ_ADD-py"
|
OBJ_ADD="$OBJ_ADD-py"
|
||||||
|
|
||||||
if pythonBin=$(which python 2>/dev/null)
|
if pythonBin=$(which python 2>/dev/null)
|
||||||
then
|
then
|
||||||
if [ -n "$PYTHON_LIBRARY" ]
|
if [ -n "$PYTHON_LIBRARY" ]
|
||||||
then
|
then
|
||||||
# check $PYTHON_LIBRARY if it has been set
|
# Check $PYTHON_LIBRARY if it has been set
|
||||||
if [ ! -e "$PYTHON_LIBRARY" ]
|
if [ ! -e "$PYTHON_LIBRARY" ]
|
||||||
then
|
then
|
||||||
echo "*** Error: libpython not found at location specified " \
|
echo "*** Error: libpython not found at location specified " \
|
||||||
@ -192,9 +182,9 @@ addPythonSupport()
|
|||||||
PYTHON_LIBRARY=$(ldd $pythonBin | \
|
PYTHON_LIBRARY=$(ldd $pythonBin | \
|
||||||
sed -ne '/libpython/s/.* => \(.*\) (.*/\1/p')
|
sed -ne '/libpython/s/.* => \(.*\) (.*/\1/p')
|
||||||
|
|
||||||
[ -e "$PYTHON_LIBRARY" ] || {
|
[ -e "$PYTHON_LIBRARY" ] || {
|
||||||
echo "*** Error: Unable to determine path to python library."
|
echo "*** Error: Unable to determine path to python library."
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -e "$PYTHON_LIBRARY" ] || {
|
[ -e "$PYTHON_LIBRARY" ] || {
|
||||||
@ -208,7 +198,7 @@ addPythonSupport()
|
|||||||
pythonMajor=$(echo $PYTHON_LIBRARY | sed 's/.*libpython\(.*\)\.so.*/\1/')
|
pythonMajor=$(echo $PYTHON_LIBRARY | sed 's/.*libpython\(.*\)\.so.*/\1/')
|
||||||
pythonInclude=/usr/include/python$pythonMajor
|
pythonInclude=/usr/include/python$pythonMajor
|
||||||
|
|
||||||
# note - we could also allow for a PYTHON_INCLUDE variable ...
|
# Note - we could also allow for a PYTHON_INCLUDE variable ...
|
||||||
[ -d "$pythonInclude" ] || {
|
[ -d "$pythonInclude" ] || {
|
||||||
echo " No python headers found in $pythonInclude/"
|
echo " No python headers found in $pythonInclude/"
|
||||||
echo " Please install python headers or deactivate "
|
echo " Please install python headers or deactivate "
|
||||||
@ -238,17 +228,20 @@ addPythonSupport()
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# define options for mesa support
|
# Define options for mesa support
|
||||||
#
|
#
|
||||||
addMesaSupport()
|
addMesaSupport()
|
||||||
{
|
{
|
||||||
[ "${withMESA:=false}" = true ] || return
|
if [ "${withMESA:=false}" != true ]
|
||||||
|
then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -d "$MESA_INCLUDE" -a -f "$MESA_LIBRARY" ]
|
if [ -d "$MESA_INCLUDE" -a -f "$MESA_LIBRARY" ]
|
||||||
then
|
then
|
||||||
OBJ_ADD="$OBJ_ADD-mesa"
|
OBJ_ADD="$OBJ_ADD-mesa"
|
||||||
|
|
||||||
addCMakeVariable "VTK_OPENGL_HAS_OSMESA=ON"
|
addCMakeVariable "VTK_OPENGL_HAS_OSMESA:BOOL=ON"
|
||||||
addCMakeVariable "OSMESA_INCLUDE_DIR=$MESA_INCLUDE"
|
addCMakeVariable "OSMESA_INCLUDE_DIR=$MESA_INCLUDE"
|
||||||
addCMakeVariable "OSMESA_LIBRARY=$MESA_LIBRARY"
|
addCMakeVariable "OSMESA_LIBRARY=$MESA_LIBRARY"
|
||||||
|
|
||||||
@ -266,69 +259,33 @@ addMesaSupport()
|
|||||||
addQtSupport()
|
addQtSupport()
|
||||||
{
|
{
|
||||||
QtVersion=none
|
QtVersion=none
|
||||||
[ "${withQT:=false}" = true ] || return
|
|
||||||
|
if [ "${withQT:=false}" != true ]
|
||||||
|
then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
addCMakeVariable "PARAVIEW_BUILD_QT_GUI=ON"
|
addCMakeVariable "PARAVIEW_BUILD_QT_GUI=ON"
|
||||||
|
|
||||||
unset qmakeExe
|
local qmake=$(findQtMake)
|
||||||
if [ -n "$QMAKE_PATH" ]
|
|
||||||
then
|
|
||||||
if [ -d "$QMAKE_PATH" ]
|
|
||||||
then
|
|
||||||
if [ -x "$QMAKE_PATH/qmake" ]
|
|
||||||
then
|
|
||||||
qmakeExe=$QMAKE_PATH/qmake
|
|
||||||
elif [ -x "$QMAKE_PATH/bin/qmake" ]
|
|
||||||
then
|
|
||||||
qmakeExe=$QMAKE_PATH/bin/qmake
|
|
||||||
fi
|
|
||||||
elif [ -x "$QMAKE_PATH" ]
|
|
||||||
then
|
|
||||||
qmakeExe=$QMAKE_PATH
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$qmakeExe" ]
|
|
||||||
then
|
|
||||||
# use absolute path
|
|
||||||
if [ "${qmakeExe#/}" = "$qmakeExe" ]
|
|
||||||
then
|
|
||||||
qmakeExe="$(cd ${qmakeExe%/qmake} 2>/dev/null && pwd)/qmake"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo
|
|
||||||
echo "qmake not found under specified QMAKE_PATH"
|
|
||||||
echo " QMAKE_PATH=$QMAKE_PATH"
|
|
||||||
echo "leaving unspecified"
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# default to using qmake from the path
|
|
||||||
if [ -n "$qmakeExe" ]
|
|
||||||
then
|
|
||||||
addCMakeVariable "QT_QMAKE_EXECUTABLE:FILEPATH=$qmakeExe"
|
|
||||||
else
|
|
||||||
qmakeExe=qmake
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Check qmake can be found
|
# Check qmake can be found
|
||||||
if type $qmakeExe >/dev/null 2>&1
|
if type $qmake >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
# Check the Qt version selected
|
# Check the Qt version selected
|
||||||
# parse -> "Using Qt version X.Y.Z in ..."
|
# parse -> "Using Qt version X.Y.Z in ..."
|
||||||
QtVersion=$($qmakeExe -query QT_VERSION)
|
QtVersion=$($qmake -query QT_VERSION)
|
||||||
|
|
||||||
# split Major.Minor.Revision - could also use IFS hacking
|
# Split Major.Minor.Revision - could also use IFS hacking
|
||||||
set -- $(echo "$QtVersion" | sed -e 's/\./ /g')
|
set -- $(echo "$QtVersion" | sed -e 's/\./ /g')
|
||||||
|
|
||||||
QtMajor=$1
|
QtMajor=$1
|
||||||
QtMinor=$2
|
QtMinor=$2
|
||||||
|
|
||||||
if [ $QtMajor -lt 4 ] || [ $QtMajor -eq 4 -a $QtMinor -lt 5 ]
|
if [ $QtMajor -ne 4 -o $QtMajor -eq 4 -a $QtMinor -lt 5 ]
|
||||||
then
|
then
|
||||||
echo "*** Error: Qt version provided < 4.5"
|
echo "*** Error: Qt version provided < 4.5"
|
||||||
echo "*** Please use the -qmake option to specify the location of a version of Qt >= 4.5 "
|
echo "*** Please use the -qmake option to specify the location of a version of Qt >= 4.5 and < 5.0"
|
||||||
echo "*** e.g."
|
echo "*** e.g."
|
||||||
echo "*** -qmake /usr/local/qt-4.6.2/bin/qmake"
|
echo "*** -qmake /usr/local/qt-4.6.2/bin/qmake"
|
||||||
echo "*** -qmake $installBASE/qt-4.6.2/bin/qmake"
|
echo "*** -qmake $installBASE/qt-4.6.2/bin/qmake"
|
||||||
@ -342,47 +299,13 @@ addQtSupport()
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# configure via cmake, but don't actually build anything
|
# Configure via cmake, but don't actually build anything
|
||||||
#
|
#
|
||||||
configParaView()
|
configParaView()
|
||||||
{
|
{
|
||||||
unset cmakeExe
|
local cmake=$(findCMake)
|
||||||
if [ -n "$CMAKE_PATH" ]
|
|
||||||
then
|
|
||||||
if [ -d "$CMAKE_PATH" ]
|
|
||||||
then
|
|
||||||
if [ -x "$CMAKE_PATH/cmake" ]
|
|
||||||
then
|
|
||||||
cmakeExe=$CMAKE_PATH/cmake
|
|
||||||
elif [ -x "$CMAKE_PATH/bin/cmake" ]
|
|
||||||
then
|
|
||||||
cmakeExe=$CMAKE_PATH/bin/cmake
|
|
||||||
fi
|
|
||||||
elif [ -x "$CMAKE_PATH" ]
|
|
||||||
then
|
|
||||||
cmakeExe=$CMAKE_PATH
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$cmakeExe" ]
|
# Remove any existing build folder and recreate
|
||||||
then
|
|
||||||
# use absolute path
|
|
||||||
if [ "${cmakeExe#/}" = "$cmakeExe" ]
|
|
||||||
then
|
|
||||||
cmakeExe="$(cd ${cmakeExe%/cmake} 2>/dev/null && pwd)/cmake"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo
|
|
||||||
echo "cmake not found under specified CMAKE_PATH"
|
|
||||||
echo " CMAKE_PATH=$CMAKE_PATH"
|
|
||||||
echo "leaving unspecified"
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# default to using cmake from the path
|
|
||||||
[ -n "$cmakeExe" ] || cmakeExe=cmake
|
|
||||||
|
|
||||||
# remove any existing build folder and recreate
|
|
||||||
if [ -d $ParaView_BINARY_DIR ]
|
if [ -d $ParaView_BINARY_DIR ]
|
||||||
then
|
then
|
||||||
echo "removing old build directory"
|
echo "removing old build directory"
|
||||||
@ -391,23 +314,22 @@ configParaView()
|
|||||||
fi
|
fi
|
||||||
mkdir -p $ParaView_BINARY_DIR
|
mkdir -p $ParaView_BINARY_DIR
|
||||||
|
|
||||||
addCMakeVariable "CMAKE_BUILD_TYPE:STRING=$buildType"
|
cd $ParaView_BINARY_DIR || exit 1 # Change to build folder
|
||||||
|
|
||||||
cd $ParaView_BINARY_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)"
|
||||||
echo " MPI support : ${withMPI:-false}"
|
echo " MPI support : ${withMPI:-false}"
|
||||||
echo " Python support : ${withPYTHON:-false}"
|
echo " Python support : ${withPYTHON:-false}"
|
||||||
echo " MESA support : ${withMESA:-false}"
|
echo " MESA support : ${withMESA:-false}"
|
||||||
|
echo " GL2 rendering : false"
|
||||||
echo " Qt dev support : ${withQT:-false}"
|
echo " Qt dev support : ${withQT:-false}"
|
||||||
echo " Source : $ParaView_SOURCE_DIR"
|
echo " Source : $ParaView_SOURCE_DIR"
|
||||||
echo " Build : $ParaView_BINARY_DIR"
|
echo " Build : $ParaView_BINARY_DIR"
|
||||||
echo " Target : $ParaView_DIR"
|
echo " Target : $ParaView_DIR"
|
||||||
echo " Build type : $buildType"
|
echo " Cmake : $cmake"
|
||||||
echo "----"
|
echo "----"
|
||||||
echo
|
echo
|
||||||
echo "$cmakeExe" \
|
echo "$cmake" \
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \
|
-DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \
|
||||||
$CMAKE_VARIABLES \
|
$CMAKE_VARIABLES \
|
||||||
$ParaView_SOURCE_DIR
|
$ParaView_SOURCE_DIR
|
||||||
@ -415,8 +337,8 @@ configParaView()
|
|||||||
echo "----"
|
echo "----"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# run cmake to create Makefiles
|
# Run cmake to create Makefiles
|
||||||
$cmakeExe \
|
$cmake -Wno-dev \
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \
|
-DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \
|
||||||
$CMAKE_VARIABLES \
|
$CMAKE_VARIABLES \
|
||||||
$ParaView_SOURCE_DIR
|
$ParaView_SOURCE_DIR
|
||||||
@ -424,40 +346,53 @@ configParaView()
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# invoke make
|
# Invoke make
|
||||||
# also link bin/ to lib/paraview-* for development without installation
|
# also link bin/ to lib/paraview-* for development without installation
|
||||||
#
|
#
|
||||||
makeParaView()
|
makeParaView()
|
||||||
{
|
{
|
||||||
cd $ParaView_BINARY_DIR || exit 1 # change to build folder
|
cd $ParaView_BINARY_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"
|
||||||
|
|
||||||
# remove lib if it is a link
|
# Remove lib if it is a link
|
||||||
# (how this was previously handled before 'make install' worked)
|
# (how this was previously handled before 'make install' worked)
|
||||||
[ -L lib ] && rm lib 2>/dev/null
|
if [ -L lib ]
|
||||||
|
then
|
||||||
|
rm lib 2>/dev/null
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# install the program
|
# Install the program
|
||||||
#
|
#
|
||||||
installParaView()
|
installParaView()
|
||||||
{
|
{
|
||||||
cd $ParaView_BINARY_DIR || exit 1 # change to build folder
|
cd $ParaView_BINARY_DIR || exit 1 # Change to build folder
|
||||||
echo " Installing ParaView to $ParaView_DIR"
|
echo " Installing ParaView to $ParaView_DIR"
|
||||||
|
|
||||||
make install
|
make install
|
||||||
|
|
||||||
|
# hack for missing files after install of version 3.14.1
|
||||||
|
echo "Copying missing files to install folder"
|
||||||
|
CMAKE_SRC_DIR=$ParaView_SOURCE_DIR/CMake
|
||||||
|
CMAKE_INSTALL_DIR=$ParaView_DIR/lib/paraview-$ParaView_MAJOR/CMake
|
||||||
|
cp -f $ParaView_SOURCE_DIR/ParaViewUse.cmake $CMAKE_INSTALL_DIR
|
||||||
|
cp -f $CMAKE_SRC_DIR/generate_proxydocumentation.cmake $CMAKE_INSTALL_DIR
|
||||||
|
cp -f $CMAKE_SRC_DIR/smxml_to_xml.xsl $CMAKE_INSTALL_DIR
|
||||||
|
cp -f $CMAKE_SRC_DIR/xml_to_html.xsl $CMAKE_INSTALL_DIR
|
||||||
|
cp -f $CMAKE_SRC_DIR/xml_to_wiki.xsl.in $CMAKE_INSTALL_DIR
|
||||||
|
cp -f $CMAKE_SRC_DIR/generate_qhp.cmake $CMAKE_INSTALL_DIR
|
||||||
|
unset CMAKE_SRC_DIR CMAKE_INSTALL_DIR
|
||||||
|
# --- end hack
|
||||||
|
|
||||||
cat<< INFO
|
cat<< INFO
|
||||||
---
|
---
|
||||||
Installation complete for paraview-$ParaView_VERSION
|
Installation complete for paraview-$ParaView_VERSION
|
||||||
Set environment variables:
|
Now update the environment by running:
|
||||||
|
wmREFRESH
|
||||||
export ParaView_DIR=$ParaView_DIR
|
|
||||||
export PATH=\$ParaView_DIR/bin:\$PATH
|
|
||||||
export PV_PLUGIN_PATH=\$FOAM_LIBBIN/paraview-$ParaView_MAJOR
|
|
||||||
---
|
---
|
||||||
INFO
|
INFO
|
||||||
}
|
}
|
||||||
@ -465,23 +400,27 @@ INFO
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# clear the referenced variables before using any of the functions
|
# Clear the referenced variables before using any of the functions
|
||||||
unset withMPI withVERBOSE
|
unset withMPI withVERBOSE
|
||||||
unset withQT QMAKE_PATH
|
unset withQT QMAKE_PATH
|
||||||
unset withMESA MESA_INCLUDE MESA_LIBRARY
|
unset withMESA MESA_INCLUDE MESA_LIBRARY
|
||||||
unset withPYTHON PYTHON_INCLUDE PYTHON_LIBRARY
|
unset withPYTHON PYTHON_INCLUDE PYTHON_LIBRARY
|
||||||
unset CMAKE_VARIABLES
|
unset CMAKE_VARIABLES
|
||||||
unset OBJ_ADD
|
unset OBJ_ADD
|
||||||
unset buildType
|
|
||||||
|
|
||||||
# start with these general settings
|
|
||||||
|
# Start with these general settings
|
||||||
|
addCMakeVariable "VTK_USE_TK:BOOL=OFF"
|
||||||
addCMakeVariable "BUILD_SHARED_LIBS:BOOL=ON VTK_USE_RPATH:BOOL=OFF"
|
addCMakeVariable "BUILD_SHARED_LIBS:BOOL=ON VTK_USE_RPATH:BOOL=OFF"
|
||||||
|
addCMakeVariable "CMAKE_BUILD_TYPE:STRING=Release"
|
||||||
|
|
||||||
# include development files in "make install"
|
# Include development files in "make install"
|
||||||
addCMakeVariable "PARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=ON"
|
addCMakeVariable "PARAVIEW_INSTALL_DEVELOPMENT:BOOL=ON"
|
||||||
|
|
||||||
# don't build test tree
|
# Don't build test tree
|
||||||
addCMakeVariable "BUILD_TESTING:BOOL=OFF"
|
addCMakeVariable "BUILD_TESTING:BOOL=OFF"
|
||||||
|
|
||||||
|
# remove dependency on WebKit
|
||||||
|
# addCMakeVariable VTK_QT_USE_WEBKIT:BOOL=OFF
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
#------------------------------------------------------------------------------
|
||||||
@ -2,8 +2,8 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
@ -32,14 +32,14 @@
|
|||||||
# buildBASE, installBASE defined from tools/ThirdPartyFunctions
|
# buildBASE, installBASE defined from tools/ThirdPartyFunctions
|
||||||
|
|
||||||
#
|
#
|
||||||
# where things are or should be put
|
# Where things are or should be put
|
||||||
# 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_BINARY_DIR : location of the build
|
||||||
# ParaView_DIR : location of the installed program
|
# ParaView_DIR : location of the installed program
|
||||||
#
|
#
|
||||||
setDirs()
|
setParaViewDirs()
|
||||||
{
|
{
|
||||||
ParaView_SOURCE_DIR=$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION
|
ParaView_SOURCE_DIR=$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION
|
||||||
|
|
||||||
@ -51,10 +51,10 @@ setDirs()
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION-$OBJ_ADD
|
# ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION${OBJ_ADD:+-$OBJ_ADD}
|
||||||
ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION
|
ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION
|
||||||
|
|
||||||
# ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION-$OBJ_ADD
|
# ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION${OBJ_ADD:+-$OBJ_ADD}
|
||||||
ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION
|
ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION
|
||||||
|
|
||||||
export ParaView_SOURCE_DIR ParaView_BINARY_DIR ParaView_DIR
|
export ParaView_SOURCE_DIR ParaView_BINARY_DIR ParaView_DIR
|
||||||
@ -63,17 +63,27 @@ setDirs()
|
|||||||
echo "ParaView_SOURCE_DIR=$ParaView_SOURCE_DIR"
|
echo "ParaView_SOURCE_DIR=$ParaView_SOURCE_DIR"
|
||||||
echo "ParaView_BINARY_DIR=$ParaView_BINARY_DIR"
|
echo "ParaView_BINARY_DIR=$ParaView_BINARY_DIR"
|
||||||
echo "ParaView_DIR=$ParaView_DIR"
|
echo "ParaView_DIR=$ParaView_DIR"
|
||||||
|
|
||||||
|
# Forcefully override the .git path for the ParaView source code directory
|
||||||
|
export GIT_DIR=$ParaView_SOURCE_DIR/.git
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# set ParaView_VERSION and adjust ParaView_MAJOR accordingly
|
# Set ParaView_VERSION and adjust ParaView_MAJOR accordingly
|
||||||
#
|
#
|
||||||
setVersion()
|
# $1 can contain something something like 4.4.0, paraview-4.4.0, ParaView-4.0.0
|
||||||
|
#
|
||||||
|
setParaViewVersion()
|
||||||
{
|
{
|
||||||
[ "$#" -ge 1 ] && ParaView_VERSION="${1##paraview-}"
|
[ $# -gt 0 ] || {
|
||||||
|
echo "Error: function setParaViewVersion() called without an argument"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
# the major version is "<digits>.<digits>"
|
ParaView_VERSION="${1##*-}"
|
||||||
|
|
||||||
|
# The major version is "<digits>.<digits>"
|
||||||
ParaView_MAJOR=$(echo $ParaView_VERSION | \
|
ParaView_MAJOR=$(echo $ParaView_VERSION | \
|
||||||
sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/')
|
sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/')
|
||||||
|
|
||||||
@ -84,58 +94,27 @@ setVersion()
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
#
|
#
|
||||||
# extract and echo date stamp information from
|
# Compare version information (specified vs what is found in CMakeLists.txt)
|
||||||
# VTK/Utilities/kwsys/kwsysDateStamp.cmake
|
# Parse this type of content:
|
||||||
# since the order of the entries is already correct, can use simple sed script
|
# set (PARAVIEW_VERSION_FULL "5.0.1")
|
||||||
#
|
|
||||||
echoDateStamp()
|
|
||||||
{
|
|
||||||
(
|
|
||||||
set -- $(
|
|
||||||
sed -ne 's/^SET(KWSYS_DATE_STAMP_[A-Z]*\([ 0-9]*\)).*$/\1/p' \
|
|
||||||
$ParaView_SOURCE_DIR/VTK/Utilities/kwsys/kwsysDateStamp.cmake
|
|
||||||
)
|
|
||||||
|
|
||||||
IFS='-'
|
|
||||||
echo "date-stamp: $*"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# extract version information from
|
|
||||||
# CMakeLists.txt
|
|
||||||
# since the order of the entries is already correct, can use simple sed script
|
|
||||||
#
|
|
||||||
getVersion()
|
|
||||||
{
|
|
||||||
(
|
|
||||||
set -- $(
|
|
||||||
sed -ne 's/^SET(PARAVIEW_VERSION_[A-Z]*\([ 0-9]*\)).*$/\1/p' \
|
|
||||||
$ParaView_SOURCE_DIR/CMakeLists.txt
|
|
||||||
)
|
|
||||||
|
|
||||||
IFS='.'
|
|
||||||
echo "$*"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# compare version information
|
|
||||||
#
|
#
|
||||||
checkVersion()
|
checkVersion()
|
||||||
{
|
{
|
||||||
local ver=$(getVersion)
|
local ver=$(
|
||||||
|
sed -ne 's/^ *set *( *PARAVIEW_VERSION_FULL[ "]*\([.0-9]*\).*$/\1/ip' \
|
||||||
|
$ParaView_SOURCE_DIR/CMakeLists.txt
|
||||||
|
)
|
||||||
|
|
||||||
if [ "$ParaView_VERSION" != "$ver" ]
|
if [ "$ParaView_VERSION" != "$ver" ]
|
||||||
then
|
then
|
||||||
echo "MISMATCH!"
|
echo "MISMATCH!"
|
||||||
echo " specified $ParaView_VERSION"
|
echo " specified $ParaView_VERSION"
|
||||||
echo " found $ver"
|
echo " found ${ver:-NONE}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# set CMake cache variables
|
# Set CMake cache variables
|
||||||
#
|
#
|
||||||
addCMakeVariable()
|
addCMakeVariable()
|
||||||
{
|
{
|
||||||
@ -148,40 +127,54 @@ addCMakeVariable()
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# verbose makefiles
|
# Verbose makefiles
|
||||||
#
|
#
|
||||||
addVerbosity()
|
addVerbosity()
|
||||||
{
|
{
|
||||||
[ "$withVERBOSE" = true ] && addCMakeVariable "CMAKE_VERBOSE_MAKEFILE=TRUE"
|
if [ "${withVERBOSE:=false}" = true ]
|
||||||
|
then
|
||||||
|
addCMakeVariable "CMAKE_VERBOSE_MAKEFILE=TRUE"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# define options for mpi support
|
# Define options for mpi support
|
||||||
#
|
#
|
||||||
addMpiSupport()
|
addMpiSupport()
|
||||||
{
|
{
|
||||||
[ "${withMPI:=false}" = true ] || return
|
if [ "${withMPI:=false}" != true ]
|
||||||
|
then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
OBJ_ADD="$OBJ_ADD-mpi"
|
OBJ_ADD="$OBJ_ADD-mpi"
|
||||||
|
|
||||||
addCMakeVariable "PARAVIEW_USE_MPI=ON VTK_USE_MPI=ON"
|
addCMakeVariable "PARAVIEW_USE_MPI=ON VTK_USE_MPI=ON"
|
||||||
addCMakeVariable "VTK_MPI_MAX_NUMPROCS=$MPI_MAX_PROCS"
|
if [ "${MPI_MAX_PROCS:=0}" -gt 1 ]
|
||||||
|
then
|
||||||
|
addCMakeVariable "VTK_MPI_MAX_NUMPROCS=$MPI_MAX_PROCS"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# define options for python support
|
# Define options for python support
|
||||||
#
|
#
|
||||||
addPythonSupport()
|
addPythonSupport()
|
||||||
{
|
{
|
||||||
[ "${withPYTHON:=false}" = true ] || return
|
if [ "${withPYTHON:=false}" != true ]
|
||||||
|
then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
OBJ_ADD="$OBJ_ADD-py"
|
OBJ_ADD="$OBJ_ADD-py"
|
||||||
|
|
||||||
if pythonBin=$(which python 2>/dev/null)
|
if pythonBin=$(which python 2>/dev/null)
|
||||||
then
|
then
|
||||||
if [ -n "$PYTHON_LIBRARY" ]
|
if [ -n "$PYTHON_LIBRARY" ]
|
||||||
then
|
then
|
||||||
# check $PYTHON_LIBRARY if it has been set
|
# Check $PYTHON_LIBRARY if it has been set
|
||||||
if [ ! -e "$PYTHON_LIBRARY" ]
|
if [ ! -e "$PYTHON_LIBRARY" ]
|
||||||
then
|
then
|
||||||
echo "*** Error: libpython not found at location specified " \
|
echo "*** Error: libpython not found at location specified " \
|
||||||
@ -192,9 +185,9 @@ addPythonSupport()
|
|||||||
PYTHON_LIBRARY=$(ldd $pythonBin | \
|
PYTHON_LIBRARY=$(ldd $pythonBin | \
|
||||||
sed -ne '/libpython/s/.* => \(.*\) (.*/\1/p')
|
sed -ne '/libpython/s/.* => \(.*\) (.*/\1/p')
|
||||||
|
|
||||||
[ -e "$PYTHON_LIBRARY" ] || {
|
[ -e "$PYTHON_LIBRARY" ] || {
|
||||||
echo "*** Error: Unable to determine path to python library."
|
echo "*** Error: Unable to determine path to python library."
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -e "$PYTHON_LIBRARY" ] || {
|
[ -e "$PYTHON_LIBRARY" ] || {
|
||||||
@ -208,8 +201,8 @@ addPythonSupport()
|
|||||||
pythonMajor=$(echo $PYTHON_LIBRARY | sed 's/.*libpython\(.*\)\.so.*/\1/')
|
pythonMajor=$(echo $PYTHON_LIBRARY | sed 's/.*libpython\(.*\)\.so.*/\1/')
|
||||||
pythonInclude=/usr/include/python$pythonMajor
|
pythonInclude=/usr/include/python$pythonMajor
|
||||||
|
|
||||||
# note - we could also allow for a PYTHON_INCLUDE variable ...
|
# Note - we could also allow for a PYTHON_INCLUDE variable ...
|
||||||
[ -d "$pythonInclude" ] || {
|
[ -d "$pythonInclude" -a -f "$pythonInclude/Python.h" ] || {
|
||||||
echo " No python headers found in $pythonInclude/"
|
echo " No python headers found in $pythonInclude/"
|
||||||
echo " Please install python headers or deactivate "
|
echo " Please install python headers or deactivate "
|
||||||
echo " python support by not using the -python option"
|
echo " python support by not using the -python option"
|
||||||
@ -217,7 +210,7 @@ addPythonSupport()
|
|||||||
}
|
}
|
||||||
|
|
||||||
addCMakeVariable "PARAVIEW_ENABLE_PYTHON=ON"
|
addCMakeVariable "PARAVIEW_ENABLE_PYTHON=ON"
|
||||||
addCMakeVariable "PYTHON_INCLUDE_PATH=$pythonInclude"
|
addCMakeVariable "PYTHON_INCLUDE_DIRS=$pythonInclude"
|
||||||
addCMakeVariable "PYTHON_LIBRARY=$PYTHON_LIBRARY"
|
addCMakeVariable "PYTHON_LIBRARY=$PYTHON_LIBRARY"
|
||||||
|
|
||||||
echo "----"
|
echo "----"
|
||||||
@ -238,17 +231,20 @@ addPythonSupport()
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# define options for mesa support
|
# Define options for mesa support
|
||||||
#
|
#
|
||||||
addMesaSupport()
|
addMesaSupport()
|
||||||
{
|
{
|
||||||
[ "${withMESA:=false}" = true ] || return
|
if [ "${withMESA:=false}" != true ]
|
||||||
|
then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -d "$MESA_INCLUDE" -a -f "$MESA_LIBRARY" ]
|
if [ -d "$MESA_INCLUDE" -a -f "$MESA_LIBRARY" ]
|
||||||
then
|
then
|
||||||
OBJ_ADD="$OBJ_ADD-mesa"
|
OBJ_ADD="$OBJ_ADD-mesa"
|
||||||
|
|
||||||
addCMakeVariable "VTK_OPENGL_HAS_OSMESA=ON"
|
addCMakeVariable "VTK_OPENGL_HAS_OSMESA:BOOL=ON"
|
||||||
addCMakeVariable "OSMESA_INCLUDE_DIR=$MESA_INCLUDE"
|
addCMakeVariable "OSMESA_INCLUDE_DIR=$MESA_INCLUDE"
|
||||||
addCMakeVariable "OSMESA_LIBRARY=$MESA_LIBRARY"
|
addCMakeVariable "OSMESA_LIBRARY=$MESA_LIBRARY"
|
||||||
|
|
||||||
@ -263,72 +259,54 @@ addMesaSupport()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# new rendering backend
|
||||||
|
#
|
||||||
|
addGL2Support()
|
||||||
|
{
|
||||||
|
if [ "${withGL2:=false}" = true ]
|
||||||
|
then
|
||||||
|
addCMakeVariable "VTK_RENDERING_BACKEND=OpenGL2"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
addQtSupport()
|
addQtSupport()
|
||||||
{
|
{
|
||||||
QtVersion=none
|
QtVersion=none
|
||||||
[ "${withQT:=false}" = true ] || return
|
|
||||||
|
if [ "${withQT:=false}" != true ]
|
||||||
|
then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
addCMakeVariable "PARAVIEW_BUILD_QT_GUI=ON"
|
addCMakeVariable "PARAVIEW_BUILD_QT_GUI=ON"
|
||||||
|
|
||||||
unset qmakeExe
|
local qmake=$(findQtMake)
|
||||||
if [ -n "$QMAKE_PATH" ]
|
|
||||||
|
# From somewhere other than in the path
|
||||||
|
if [ "${qmake:=qmake}" != qmake ]
|
||||||
then
|
then
|
||||||
if [ -d "$QMAKE_PATH" ]
|
addCMakeVariable "QT_QMAKE_EXECUTABLE:FILEPATH=$qmake"
|
||||||
then
|
|
||||||
if [ -x "$QMAKE_PATH/qmake" ]
|
|
||||||
then
|
|
||||||
qmakeExe=$QMAKE_PATH/qmake
|
|
||||||
elif [ -x "$QMAKE_PATH/bin/qmake" ]
|
|
||||||
then
|
|
||||||
qmakeExe=$QMAKE_PATH/bin/qmake
|
|
||||||
fi
|
|
||||||
elif [ -x "$QMAKE_PATH" ]
|
|
||||||
then
|
|
||||||
qmakeExe=$QMAKE_PATH
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$qmakeExe" ]
|
|
||||||
then
|
|
||||||
# use absolute path
|
|
||||||
if [ "${qmakeExe#/}" = "$qmakeExe" ]
|
|
||||||
then
|
|
||||||
qmakeExe="$(cd ${qmakeExe%/qmake} 2>/dev/null && pwd)/qmake"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo
|
|
||||||
echo "qmake not found under specified QMAKE_PATH"
|
|
||||||
echo " QMAKE_PATH=$QMAKE_PATH"
|
|
||||||
echo "leaving unspecified"
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# default to using qmake from the path
|
|
||||||
if [ -n "$qmakeExe" ]
|
|
||||||
then
|
|
||||||
addCMakeVariable "QT_QMAKE_EXECUTABLE:FILEPATH=$qmakeExe"
|
|
||||||
else
|
|
||||||
qmakeExe=qmake
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Check qmake can be found
|
# Check qmake can be found
|
||||||
if type $qmakeExe >/dev/null 2>&1
|
if type $qmake >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
# Check the Qt version selected
|
# Check the Qt version selected
|
||||||
# parse -> "Using Qt version X.Y.Z in ..."
|
# parse -> "Using Qt version X.Y.Z in ..."
|
||||||
QtVersion=$($qmakeExe -query QT_VERSION)
|
QtVersion=$($qmake -query QT_VERSION)
|
||||||
|
|
||||||
# split Major.Minor.Revision - could also use IFS hacking
|
# Split Major.Minor.Revision - could also use IFS hacking
|
||||||
set -- $(echo "$QtVersion" | sed -e 's/\./ /g')
|
set -- $(echo "$QtVersion" | sed -e 's/\./ /g')
|
||||||
|
|
||||||
QtMajor=$1
|
QtMajor=$1
|
||||||
QtMinor=$2
|
QtMinor=$2
|
||||||
|
|
||||||
if [[ ($QtMajor -lt 4) || ($QtMajor -eq 4 && $QtMinor -lt 5) ]]
|
if [ $QtMajor -lt 4 -o $QtMajor -eq 4 -a $QtMinor -lt 5 ]
|
||||||
then
|
then
|
||||||
echo "*** Error: Qt version provided < 4.5"
|
echo "*** Error: Qt version provided < 4.5"
|
||||||
echo "*** Please use the -qmake option to specify the location of a version of Qt >= 4.5 "
|
echo "*** Please use the -qmake option to specify the location of a version of Qt >= 4.5"
|
||||||
echo "*** e.g."
|
echo "*** e.g."
|
||||||
echo "*** -qmake /usr/local/qt-4.6.2/bin/qmake"
|
echo "*** -qmake /usr/local/qt-4.6.2/bin/qmake"
|
||||||
echo "*** -qmake $installBASE/qt-4.6.2/bin/qmake"
|
echo "*** -qmake $installBASE/qt-4.6.2/bin/qmake"
|
||||||
@ -342,47 +320,22 @@ addQtSupport()
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# configure via cmake, but don't actually build anything
|
# Apply source-code patch if possible
|
||||||
|
#
|
||||||
|
patchParaView()
|
||||||
|
{
|
||||||
|
applyPatch "paraview-$ParaView_VERSION" "$ParaView_SOURCE_DIR"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Configure via cmake, but don't actually build anything
|
||||||
#
|
#
|
||||||
configParaView()
|
configParaView()
|
||||||
{
|
{
|
||||||
unset cmakeExe
|
local cmake=$(findCMake)
|
||||||
if [ -n "$CMAKE_PATH" ]
|
|
||||||
then
|
|
||||||
if [ -d "$CMAKE_PATH" ]
|
|
||||||
then
|
|
||||||
if [ -x "$CMAKE_PATH/cmake" ]
|
|
||||||
then
|
|
||||||
cmakeExe=$CMAKE_PATH/cmake
|
|
||||||
elif [ -x "$CMAKE_PATH/bin/cmake" ]
|
|
||||||
then
|
|
||||||
cmakeExe=$CMAKE_PATH/bin/cmake
|
|
||||||
fi
|
|
||||||
elif [ -x "$CMAKE_PATH" ]
|
|
||||||
then
|
|
||||||
cmakeExe=$CMAKE_PATH
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$cmakeExe" ]
|
# Remove any existing build folder and recreate
|
||||||
then
|
|
||||||
# use absolute path
|
|
||||||
if [ "${cmakeExe#/}" = "$cmakeExe" ]
|
|
||||||
then
|
|
||||||
cmakeExe="$(cd ${cmakeExe%/cmake} 2>/dev/null && pwd)/cmake"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo
|
|
||||||
echo "cmake not found under specified CMAKE_PATH"
|
|
||||||
echo " CMAKE_PATH=$CMAKE_PATH"
|
|
||||||
echo "leaving unspecified"
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# default to using cmake from the path
|
|
||||||
[ -n "$cmakeExe" ] || cmakeExe=cmake
|
|
||||||
|
|
||||||
# remove any existing build folder and recreate
|
|
||||||
if [ -d $ParaView_BINARY_DIR ]
|
if [ -d $ParaView_BINARY_DIR ]
|
||||||
then
|
then
|
||||||
echo "removing old build directory"
|
echo "removing old build directory"
|
||||||
@ -391,20 +344,25 @@ configParaView()
|
|||||||
fi
|
fi
|
||||||
mkdir -p $ParaView_BINARY_DIR
|
mkdir -p $ParaView_BINARY_DIR
|
||||||
|
|
||||||
cd $ParaView_BINARY_DIR || exit 1 # change to build folder
|
addCMakeVariable "CMAKE_BUILD_TYPE:STRING=$buildType"
|
||||||
|
|
||||||
|
cd $ParaView_BINARY_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)"
|
||||||
echo " MPI support : ${withMPI:-false}"
|
echo " MPI support : ${withMPI:-false}"
|
||||||
echo " Python support : ${withPYTHON:-false}"
|
echo " Python support : ${withPYTHON:-false}"
|
||||||
echo " MESA support : ${withMESA:-false}"
|
echo " MESA support : ${withMESA:-false}"
|
||||||
|
echo " GL2 rendering : ${withGL2:-false}"
|
||||||
echo " Qt dev support : ${withQT:-false}"
|
echo " Qt dev support : ${withQT:-false}"
|
||||||
echo " Source : $ParaView_SOURCE_DIR"
|
echo " Source : $ParaView_SOURCE_DIR"
|
||||||
echo " Build : $ParaView_BINARY_DIR"
|
echo " Build : $ParaView_BINARY_DIR"
|
||||||
echo " Target : $ParaView_DIR"
|
echo " Target : $ParaView_DIR"
|
||||||
|
echo " Build type : $buildType"
|
||||||
|
echo " Cmake : $cmake"
|
||||||
echo "----"
|
echo "----"
|
||||||
echo
|
echo
|
||||||
echo "$cmakeExe" \
|
echo "$cmake" \
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \
|
-DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \
|
||||||
$CMAKE_VARIABLES \
|
$CMAKE_VARIABLES \
|
||||||
$ParaView_SOURCE_DIR
|
$ParaView_SOURCE_DIR
|
||||||
@ -412,8 +370,8 @@ configParaView()
|
|||||||
echo "----"
|
echo "----"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# run cmake to create Makefiles
|
# Run cmake to create Makefiles
|
||||||
$cmakeExe \
|
$cmake \
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \
|
-DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \
|
||||||
$CMAKE_VARIABLES \
|
$CMAKE_VARIABLES \
|
||||||
$ParaView_SOURCE_DIR
|
$ParaView_SOURCE_DIR
|
||||||
@ -421,53 +379,43 @@ configParaView()
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# invoke make
|
# Invoke make
|
||||||
# also link bin/ to lib/paraview-* for development without installation
|
# also link bin/ to lib/paraview-* for development without installation
|
||||||
#
|
#
|
||||||
makeParaView()
|
makeParaView()
|
||||||
{
|
{
|
||||||
cd $ParaView_BINARY_DIR || exit 1 # change to build folder
|
cd $ParaView_BINARY_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"
|
||||||
|
|
||||||
# remove lib if it is a link
|
# Remove lib if it is a link
|
||||||
# (how this was previously handled before 'make install' worked)
|
# (how this was previously handled before 'make install' worked)
|
||||||
[ -L lib ] && rm lib 2>/dev/null
|
if [ -L lib ]
|
||||||
|
then
|
||||||
|
rm lib 2>/dev/null
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# install the program
|
# Install the program
|
||||||
#
|
#
|
||||||
installParaView()
|
installParaView()
|
||||||
{
|
{
|
||||||
cd $ParaView_BINARY_DIR || exit 1 # change to build folder
|
cd $ParaView_BINARY_DIR || exit 1 # Change to build folder
|
||||||
echo " Installing ParaView to $ParaView_DIR"
|
echo " Installing ParaView to $ParaView_DIR"
|
||||||
|
|
||||||
make install
|
make install
|
||||||
|
|
||||||
# hack for missing files after install of version 3.14.1
|
|
||||||
echo "Copying missing files to install folder"
|
|
||||||
CMAKE_SRC_DIR=$ParaView_SOURCE_DIR/CMake
|
|
||||||
CMAKE_INSTALL_DIR=$ParaView_DIR/lib/paraview-$ParaView_MAJOR/CMake
|
|
||||||
cp -f $ParaView_SOURCE_DIR/ParaViewUse.cmake $CMAKE_INSTALL_DIR
|
|
||||||
cp -f $CMAKE_SRC_DIR/generate_proxydocumentation.cmake $CMAKE_INSTALL_DIR
|
|
||||||
cp -f $CMAKE_SRC_DIR/smxml_to_xml.xsl $CMAKE_INSTALL_DIR
|
|
||||||
cp -f $CMAKE_SRC_DIR/xml_to_html.xsl $CMAKE_INSTALL_DIR
|
|
||||||
cp -f $CMAKE_SRC_DIR/xml_to_wiki.xsl.in $CMAKE_INSTALL_DIR
|
|
||||||
cp -f $CMAKE_SRC_DIR/generate_qhp.cmake $CMAKE_INSTALL_DIR
|
|
||||||
unset CMAKE_SRC_DIR CMAKE_INSTALL_DIR
|
|
||||||
# --- end hack
|
|
||||||
|
|
||||||
cat<< INFO
|
cat<< INFO
|
||||||
|
|
||||||
---
|
---
|
||||||
Installation complete for paraview-$ParaView_VERSION
|
Installation complete for paraview-$ParaView_VERSION
|
||||||
Set environment variables:
|
ParaView_DIR=$ParaView_DIR
|
||||||
|
|
||||||
export ParaView_DIR=$ParaView_DIR
|
You may need to update the OpenFOAM environment by running:
|
||||||
export PATH=\$ParaView_DIR/bin:\$PATH
|
wmREFRESH
|
||||||
export PV_PLUGIN_PATH=\$FOAM_LIBBIN/paraview-$ParaView_MAJOR
|
|
||||||
---
|
---
|
||||||
INFO
|
INFO
|
||||||
}
|
}
|
||||||
@ -475,27 +423,23 @@ INFO
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# clear the referenced variables before using any of the functions
|
# Clear the referenced variables before using any of the functions
|
||||||
unset withMPI withVERBOSE
|
unset withMPI withVERBOSE
|
||||||
unset withQT QMAKE_PATH
|
unset withQT QMAKE_PATH
|
||||||
unset withMESA MESA_INCLUDE MESA_LIBRARY
|
unset withMESA MESA_INCLUDE MESA_LIBRARY
|
||||||
unset withPYTHON PYTHON_INCLUDE PYTHON_LIBRARY
|
unset withPYTHON PYTHON_INCLUDE PYTHON_LIBRARY
|
||||||
unset CMAKE_VARIABLES
|
unset CMAKE_VARIABLES
|
||||||
unset OBJ_ADD
|
unset OBJ_ADD
|
||||||
|
unset buildType
|
||||||
|
|
||||||
|
# Start with these general settings
|
||||||
# start with these general settings
|
|
||||||
addCMakeVariable "VTK_USE_TK:BOOL=OFF"
|
|
||||||
addCMakeVariable "BUILD_SHARED_LIBS:BOOL=ON VTK_USE_RPATH:BOOL=OFF"
|
addCMakeVariable "BUILD_SHARED_LIBS:BOOL=ON VTK_USE_RPATH:BOOL=OFF"
|
||||||
addCMakeVariable "CMAKE_BUILD_TYPE:STRING=Release"
|
|
||||||
|
|
||||||
# include development files in "make install"
|
# Include development files in "make install"
|
||||||
addCMakeVariable "PARAVIEW_INSTALL_DEVELOPMENT:BOOL=ON"
|
addCMakeVariable "PARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=ON"
|
||||||
|
|
||||||
# don't build test tree
|
# Don't build test tree
|
||||||
addCMakeVariable "BUILD_TESTING:BOOL=OFF"
|
addCMakeVariable "BUILD_TESTING:BOOL=OFF"
|
||||||
|
|
||||||
# remove dependency on WebKit
|
|
||||||
# addCMakeVariable VTK_QT_USE_WEBKIT:BOOL=OFF
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
@ -31,29 +31,198 @@
|
|||||||
# Define WM_NCOMPPROCS always.
|
# Define WM_NCOMPPROCS always.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# define the normal build and prefix directories
|
# Define the normal build and prefix directories
|
||||||
buildBASE=$WM_THIRD_PARTY_DIR/build/$WM_ARCH$WM_COMPILER
|
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
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# mostly building without wmake
|
# Mostly building without wmake
|
||||||
# - disable wmakeScheduler variables
|
# - disable wmakeScheduler variables
|
||||||
# - restrict WM_NCOMPPROCS to local number of cores
|
# - use max number of cores for building
|
||||||
#
|
#
|
||||||
unset WM_HOSTS WM_SCHEDULER
|
unset WM_HOSTS WM_SCHEDULER
|
||||||
export WM_NCOMPPROCS=$(egrep "^processor" /proc/cpuinfo 2>/dev/null | wc -l)
|
if [ -r /proc/cpuinfo ]
|
||||||
if [ $WM_NCOMPPROCS -le 1 ]
|
|
||||||
then
|
then
|
||||||
|
WM_NCOMPPROCS=$(egrep "^processor" /proc/cpuinfo | wc -l)
|
||||||
|
else
|
||||||
WM_NCOMPPROCS=1
|
WM_NCOMPPROCS=1
|
||||||
elif [ $WM_NCOMPPROCS -ge 8 ]
|
|
||||||
then
|
|
||||||
WM_NCOMPPROCS=8
|
|
||||||
fi
|
fi
|
||||||
|
export WM_NCOMPPROCS
|
||||||
# echo "Building on $WM_NCOMPPROCS cores"
|
# echo "Building on $WM_NCOMPPROCS cores"
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# download file $1 from url $2 into download/ directory
|
# If WM_CONTINUE_ON_ERROR not set activate the shell option "stop on error"
|
||||||
|
#
|
||||||
|
if [ -z "${WM_CONTINUE_ON_ERROR}" ]
|
||||||
|
then
|
||||||
|
set -e
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Report error and exit
|
||||||
|
die()
|
||||||
|
{
|
||||||
|
exec 1>&2
|
||||||
|
echo
|
||||||
|
echo "Error: see '${0##*/} -help' for usage"
|
||||||
|
while [ "$#" -ge 1 ]; do echo " $1"; shift; done
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Test if it matches "*-none"
|
||||||
|
_foamIsNone()
|
||||||
|
{
|
||||||
|
test "${1##*-}" = none
|
||||||
|
}
|
||||||
|
|
||||||
|
# Test if it matches "*-system"
|
||||||
|
_foamIsSystem()
|
||||||
|
{
|
||||||
|
test "${1##*-}" = system
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# try to locate cmake according to the CMAKE_PATH
|
||||||
|
# or just use what is found in the path
|
||||||
|
#
|
||||||
|
findCMake()
|
||||||
|
{
|
||||||
|
local candidate
|
||||||
|
local foundExe
|
||||||
|
|
||||||
|
if [ -n "$CMAKE_PATH" ]
|
||||||
|
then
|
||||||
|
# check as directory
|
||||||
|
if [ -d "$CMAKE_PATH" ]
|
||||||
|
then
|
||||||
|
for candidate in \
|
||||||
|
$CMAKE_PATH/cmake \
|
||||||
|
$CMAKE_PATH/bin/cmake \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
if [ -f "$candidate" -a -x "$candidate" ]
|
||||||
|
then
|
||||||
|
foundExe=$candidate
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# check as file, include ThirdParty installation in the search
|
||||||
|
if [ -z "$foundExe" ]
|
||||||
|
then
|
||||||
|
for candidate in \
|
||||||
|
$CMAKE_PATH \
|
||||||
|
$installBASE/$CMAKE_PATH/bin/cmake \
|
||||||
|
$installBASE/cmake-$CMAKE_PATH/bin/cmake \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
if [ -f "$candidate" -a -x "$candidate" ]
|
||||||
|
then
|
||||||
|
foundExe=$candidate
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$foundExe" ]
|
||||||
|
then
|
||||||
|
# Use absolute path
|
||||||
|
if [ "${foundExe#/}" = "$foundExe" ]
|
||||||
|
then
|
||||||
|
foundExe="$(cd ${foundExe%/cmake} 2>/dev/null && pwd)/cmake"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$foundExe"
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
cat << NOT_FOUND 1>&2
|
||||||
|
'cmake' not found under specified CMAKE_PATH
|
||||||
|
CMAKE_PATH=$CMAKE_PATH
|
||||||
|
reverting to using command from path
|
||||||
|
NOT_FOUND
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Default is cmake from the path
|
||||||
|
echo cmake
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# try to locate qmake according to the QMAKE_PATH
|
||||||
|
# or just use what is found in the path
|
||||||
|
#
|
||||||
|
findQtMake()
|
||||||
|
{
|
||||||
|
local candidate
|
||||||
|
local foundExe
|
||||||
|
|
||||||
|
if [ -n "$QMAKE_PATH" ]
|
||||||
|
then
|
||||||
|
# check as directory
|
||||||
|
if [ -d "$QMAKE_PATH" ]
|
||||||
|
then
|
||||||
|
for candidate in \
|
||||||
|
$QMAKE_PATH/qmake \
|
||||||
|
$QMAKE_PATH/bin/qmake \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
if [ -f "$candidate" -a -x "$candidate" ]
|
||||||
|
then
|
||||||
|
foundExe=$candidate
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# check as file, include ThirdParty installation in the search
|
||||||
|
if [ -z "$foundExe" ]
|
||||||
|
then
|
||||||
|
for candidate in \
|
||||||
|
$QMAKE_PATH \
|
||||||
|
$installBASE/$QMAKE_PATH/bin/qmake \
|
||||||
|
$installBASE/qt-$QMAKE_PATH/bin/qmake \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
if [ -f "$candidate" -a -x "$candidate" ]
|
||||||
|
then
|
||||||
|
foundExe=$candidate
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$foundExe" ]
|
||||||
|
then
|
||||||
|
# Use absolute path
|
||||||
|
if [ "${foundExe#/}" = "$foundExe" ]
|
||||||
|
then
|
||||||
|
foundExe="$(cd ${foundExe%/qmake} 2>/dev/null && pwd)/qmake"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$foundExe"
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
cat << NOT_FOUND 1>&2
|
||||||
|
'qmake' not found under specified QMAKE_PATH
|
||||||
|
QMAKE_PATH=$QMAKE_PATH
|
||||||
|
reverting to using command from path
|
||||||
|
NOT_FOUND
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Default is qmake from the path
|
||||||
|
echo qmake
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Download file $1 from url $2 into download/ directory
|
||||||
#
|
#
|
||||||
downloadFile()
|
downloadFile()
|
||||||
{
|
{
|
||||||
@ -62,8 +231,8 @@ downloadFile()
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
file="$1"
|
local file="$1"
|
||||||
url="$2"
|
local url="$2"
|
||||||
|
|
||||||
if [ ! -e download/$file ]
|
if [ ! -e download/$file ]
|
||||||
then
|
then
|
||||||
@ -75,10 +244,10 @@ downloadFile()
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# copy Make/{files,options} from wmakeFiles/PACKAGE
|
# Copy Make/{files,options} from etc/wmakeFiles/PACKAGE
|
||||||
#
|
#
|
||||||
# $1 = PACKAGE
|
# $1 = PACKAGE
|
||||||
# $2 (optional) TARGET DIRECTORY
|
# $2 = TARGET DIRECTORY (optional)
|
||||||
cpMakeFiles()
|
cpMakeFiles()
|
||||||
{
|
{
|
||||||
set +x
|
set +x
|
||||||
@ -88,8 +257,8 @@ cpMakeFiles()
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg=$1
|
local pkg=$1
|
||||||
dst=${2:-.}
|
local dst="${2:-.}"
|
||||||
echo "cpMakeFiles" $pkg $dst
|
echo "cpMakeFiles" $pkg $dst
|
||||||
|
|
||||||
wmakeFiles=$WM_THIRD_PARTY_DIR/etc/wmakeFiles/$pkg
|
wmakeFiles=$WM_THIRD_PARTY_DIR/etc/wmakeFiles/$pkg
|
||||||
@ -119,4 +288,41 @@ cpMakeFiles()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
#
|
||||||
|
# Apply source-code patch if possible.
|
||||||
|
# Patches are taken from etc/patches/PACKAGE
|
||||||
|
#
|
||||||
|
# $1 = PACKAGE
|
||||||
|
# $2 = TARGET DIRECTORY (optional)
|
||||||
|
applyPatch()
|
||||||
|
{
|
||||||
|
[ "$#" -eq 1 -o "$#" -eq 2 ] || {
|
||||||
|
echo "applyPatch called with incorrect number of arguments ($#): $@"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
local pkg="$1"
|
||||||
|
local dst="${2:-.}"
|
||||||
|
|
||||||
|
local patch="$WM_THIRD_PARTY_DIR/etc/patches/$pkg"
|
||||||
|
local sentinel="PATCHED_DURING_OPENFOAM_BUILD"
|
||||||
|
|
||||||
|
if [ -r "$patch" ]
|
||||||
|
then
|
||||||
|
(
|
||||||
|
cd $dst || exit 1
|
||||||
|
if [ -f "$sentinel" ]
|
||||||
|
then
|
||||||
|
echo "patch for $pkg was already applied"
|
||||||
|
else
|
||||||
|
echo "apply patch for $pkg"
|
||||||
|
touch "$sentinel"
|
||||||
|
patch -p1 < $patch 2>&1 | tee $sentinel
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
else
|
||||||
|
echo "no patch found for $pkg"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
204
etc/tools/vtkFunctions
Normal file
204
etc/tools/vtkFunctions
Normal file
@ -0,0 +1,204 @@
|
|||||||
|
#---------------------------------*- sh -*-------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM.
|
||||||
|
#
|
||||||
|
# OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
# for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# File
|
||||||
|
# etc/tools/vtkFunctions
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# VTK (library) make/install helper functions.
|
||||||
|
# To be loaded *after* etc/tools/ParaViewFunctions
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# buildBASE, installBASE defined from tools/ThirdPartyFunctions
|
||||||
|
|
||||||
|
#
|
||||||
|
# Where things are or should be put
|
||||||
|
# VTK_VERSION and VTK_MAJOR should already have been set
|
||||||
|
#
|
||||||
|
# VTK_SOURCE_DIR : location of the original sources
|
||||||
|
# VTK_BINARY_DIR : location of the build
|
||||||
|
# VTK_DIR : location of the installed program
|
||||||
|
#
|
||||||
|
setVtkDirs()
|
||||||
|
{
|
||||||
|
VTK_SOURCE_DIR=$WM_THIRD_PARTY_DIR/VTK-$VTK_VERSION
|
||||||
|
|
||||||
|
[ -d "$VTK_SOURCE_DIR" ] || {
|
||||||
|
echo "did not find VTK-$VTK_VERSION in these directories:"
|
||||||
|
echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR"
|
||||||
|
echo
|
||||||
|
echo "abort build"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# VTK_BINARY_DIR=$buildBASE/VTK-$VTK_VERSION${OBJ_ADD:+-$OBJ_ADD}
|
||||||
|
VTK_BINARY_DIR=$buildBASE/VTK-$VTK_VERSION
|
||||||
|
|
||||||
|
# VTK_DIR=$installBASE/VTK-$VTK_VERSION${OBJ_ADD:+-$OBJ_ADD}
|
||||||
|
VTK_DIR=$installBASE/VTK-$VTK_VERSION
|
||||||
|
|
||||||
|
export VTK_SOURCE_DIR VTK_BINARY_DIR VTK_DIR
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "VTK_SOURCE_DIR=$VTK_SOURCE_DIR"
|
||||||
|
echo "VTK_BINARY_DIR=$VTK_BINARY_DIR"
|
||||||
|
echo "VTK_DIR=$VTK_DIR"
|
||||||
|
|
||||||
|
# Forcefully override the .git path for the VTK source code directory
|
||||||
|
export GIT_DIR=$ParaView_SOURCE_DIR/.git
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Set VTK_VERSION and adjust VTK_MAJOR accordingly
|
||||||
|
#
|
||||||
|
# $1 can contain something something like 4.4.0, vtk-4.4.0, VTK-4.0.0
|
||||||
|
#
|
||||||
|
setVtkVersion()
|
||||||
|
{
|
||||||
|
[ $# -gt 0 ] || {
|
||||||
|
echo "Error: function setVtkVersion() called without an argument"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
VTK_VERSION="${1##*-}"
|
||||||
|
|
||||||
|
# The major version is "<digits>.<digits>"
|
||||||
|
VTK_MAJOR=$(echo $VTK_VERSION | \
|
||||||
|
sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/')
|
||||||
|
|
||||||
|
export VTK_VERSION VTK_MAJOR
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#
|
||||||
|
# Apply source-code patch if possible
|
||||||
|
#
|
||||||
|
patchVTK()
|
||||||
|
{
|
||||||
|
applyPatch "vtk-$VTK_VERSION" "$VTK_SOURCE_DIR"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Configure via cmake, but don't actually build anything
|
||||||
|
#
|
||||||
|
configVTK()
|
||||||
|
{
|
||||||
|
local cmake=$(findCMake)
|
||||||
|
|
||||||
|
# Remove any existing build folder and recreate
|
||||||
|
if [ -d $VTK_BINARY_DIR ]
|
||||||
|
then
|
||||||
|
echo "removing old build directory"
|
||||||
|
echo " $VTK_BINARY_DIR"
|
||||||
|
rm -rf $VTK_BINARY_DIR
|
||||||
|
fi
|
||||||
|
mkdir -p $VTK_BINARY_DIR
|
||||||
|
|
||||||
|
addCMakeVariable "CMAKE_BUILD_TYPE:STRING=$buildType"
|
||||||
|
|
||||||
|
cd $VTK_BINARY_DIR || exit 1 # change to build folder
|
||||||
|
|
||||||
|
echo "----"
|
||||||
|
echo "Configuring VTK-$VTK_VERSION"
|
||||||
|
echo " MESA support : ${withMESA:-false}"
|
||||||
|
echo " Source : $VTK_SOURCE_DIR"
|
||||||
|
echo " Build : $VTK_BINARY_DIR"
|
||||||
|
echo " Target : $VTK_DIR"
|
||||||
|
echo " Build type : $buildType"
|
||||||
|
echo " Cmake : $cmake"
|
||||||
|
echo "----"
|
||||||
|
echo
|
||||||
|
echo "$cmake" \
|
||||||
|
-DCMAKE_INSTALL_PREFIX:PATH=$VTK_DIR \
|
||||||
|
$CMAKE_VARIABLES \
|
||||||
|
$VTK_SOURCE_DIR
|
||||||
|
echo
|
||||||
|
echo "----"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Run cmake to create Makefiles
|
||||||
|
$cmake \
|
||||||
|
-DCMAKE_INSTALL_PREFIX:PATH=$VTK_DIR \
|
||||||
|
$CMAKE_VARIABLES \
|
||||||
|
$VTK_SOURCE_DIR
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Invoke make
|
||||||
|
# also link bin/ to lib/paraview-* for development without installation
|
||||||
|
#
|
||||||
|
makeVTK()
|
||||||
|
{
|
||||||
|
cd $VTK_BINARY_DIR || exit 1 # change to build folder
|
||||||
|
echo " Starting make"
|
||||||
|
time make -j $WM_NCOMPPROCS
|
||||||
|
echo " Done make"
|
||||||
|
|
||||||
|
# Remove lib if it is a link
|
||||||
|
# (how this was previously handled before 'make install' worked)
|
||||||
|
if [ -L lib ]
|
||||||
|
then
|
||||||
|
rm lib 2>/dev/null
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Install the program
|
||||||
|
#
|
||||||
|
installVTK()
|
||||||
|
{
|
||||||
|
cd $VTK_BINARY_DIR || exit 1 # Change to build folder
|
||||||
|
echo " Installing VTK to $VTK_DIR"
|
||||||
|
|
||||||
|
make install
|
||||||
|
|
||||||
|
cat<< INFO
|
||||||
|
|
||||||
|
---
|
||||||
|
Installation complete for vtk-$VTK_VERSION
|
||||||
|
VTK_DIR=$VTK_DIR
|
||||||
|
---
|
||||||
|
INFO
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Clear the referenced variables before using any of the functions
|
||||||
|
unset CMAKE_VARIABLES
|
||||||
|
|
||||||
|
# Start with these general settings
|
||||||
|
addCMakeVariable "BUILD_SHARED_LIBS:BOOL=ON VTK_USE_RPATH:BOOL=OFF"
|
||||||
|
|
||||||
|
# Don't build test tree
|
||||||
|
addCMakeVariable "BUILD_TESTING:BOOL=OFF"
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
27
etc/wmakeFiles/libccmio/files
Normal file
27
etc/wmakeFiles/libccmio/files
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
/* NOTE: make any changes to this file in etc/wmakeFiles/ */
|
||||||
|
|
||||||
|
adf = libadf
|
||||||
|
$(adf)/ADF_fortran_2_c.c
|
||||||
|
$(adf)/ADF_interface.c
|
||||||
|
$(adf)/ADF_internals.c
|
||||||
|
|
||||||
|
ccmio = libccmio
|
||||||
|
$(ccmio)/ccmio.c
|
||||||
|
$(ccmio)/ccmiocore.c
|
||||||
|
$(ccmio)/ccmioprivate.c
|
||||||
|
$(ccmio)/ccmioutility.c
|
||||||
|
$(ccmio)/ccmioversion.c
|
||||||
|
|
||||||
|
/*
|
||||||
|
* the cgns library is not used by ccmio
|
||||||
|
* retain for documentation purposes only
|
||||||
|
*
|
||||||
|
cgns = libcgns
|
||||||
|
$(cgns)/adf_cond.c
|
||||||
|
$(cgns)/adf_ftoc.c
|
||||||
|
$(cgns)/cgns_error.c
|
||||||
|
$(cgns)/cgns_internals.c
|
||||||
|
$(cgns)/cgnslib.c
|
||||||
|
*/
|
||||||
|
|
||||||
|
LIB = $(FOAM_EXT_LIBBIN)/libccmio
|
||||||
3
etc/wmakeFiles/libccmio/options
Normal file
3
etc/wmakeFiles/libccmio/options
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
/* NOTE: make any changes to this file in etc/wmakeFiles/ */
|
||||||
|
|
||||||
|
/* EXE_INC = */
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
# openfoam notes:
|
||||||
|
# WM_CFLAGS, WM_LDFLAGS contain "-m32 -fPIC" etc
|
||||||
|
# WM_LABEL_SIZE == 64 for 'long' instead of 'int' for OpenFOAM labels
|
||||||
|
|
||||||
|
# compiled without pthread
|
||||||
|
|
||||||
|
EXE =
|
||||||
|
LIB = .so
|
||||||
|
OBJ = .o
|
||||||
|
|
||||||
|
MAKE = make
|
||||||
|
AR = gcc
|
||||||
|
ARFLAGS = $(WM_CFLAGS) -shared -o
|
||||||
|
CAT = cat
|
||||||
|
CCS = gcc
|
||||||
|
CCP = mpicc
|
||||||
|
CCD = mpicc
|
||||||
|
CFLAGS = $(WM_CFLAGS) -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -Drestrict=__restrict
|
||||||
|
|
||||||
|
# 32-bit vs. 64-bit labels
|
||||||
|
ifeq ($(WM_LABEL_SIZE),64)
|
||||||
|
CFLAGS += -DINTSIZE64
|
||||||
|
endif
|
||||||
|
|
||||||
|
CLIBFLAGS = -shared
|
||||||
|
LDFLAGS = -Xlinker --no-as-needed $(WM_LDFLAGS) -lz -lm -lrt
|
||||||
|
CP = cp
|
||||||
|
LEX = flex -Pscotchyy -olex.yy.c
|
||||||
|
LN = ln
|
||||||
|
MKDIR = mkdir
|
||||||
|
MV = mv
|
||||||
|
RANLIB = echo
|
||||||
|
YACC = bison -pscotchyy -y -b y
|
||||||
@ -1,21 +0,0 @@
|
|||||||
EXE =
|
|
||||||
LIB = .so
|
|
||||||
OBJ = .o
|
|
||||||
|
|
||||||
MAKE = make
|
|
||||||
AR = gcc
|
|
||||||
ARFLAGS = -m32 -shared -o
|
|
||||||
CAT = cat
|
|
||||||
CCS = gcc
|
|
||||||
CCP = mpicc
|
|
||||||
CCD = mpicc
|
|
||||||
CFLAGS = -m32 -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -Drestrict=__restrict
|
|
||||||
CLIBFLAGS = -shared -fPIC
|
|
||||||
LDFLAGS = -Xlinker --no-as-needed -L$MPI_ARCH_PATH/lib -m32 -lz -lm -lrt
|
|
||||||
CP = cp
|
|
||||||
LEX = flex -Pscotchyy -olex.yy.c
|
|
||||||
LN = ln
|
|
||||||
MKDIR = mkdir
|
|
||||||
MV = mv
|
|
||||||
RANLIB = echo
|
|
||||||
YACC = bison -pscotchyy -y -b y
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
EXE =
|
|
||||||
LIB = .so
|
|
||||||
OBJ = .o
|
|
||||||
|
|
||||||
MAKE = make
|
|
||||||
AR = gcc
|
|
||||||
ARFLAGS = -shared -o
|
|
||||||
CAT = cat
|
|
||||||
CCS = gcc
|
|
||||||
CCP = mpicc
|
|
||||||
CCD = mpicc
|
|
||||||
CFLAGS = -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -Drestrict=__restrict
|
|
||||||
CLIBFLAGS = -shared -fPIC
|
|
||||||
LDFLAGS = -Xlinker --no-as-needed -lz -lm -lrt
|
|
||||||
CP = cp
|
|
||||||
LEX = flex -Pscotchyy -olex.yy.c
|
|
||||||
LN = ln
|
|
||||||
MKDIR = mkdir
|
|
||||||
MV = mv
|
|
||||||
RANLIB = echo
|
|
||||||
YACC = bison -pscotchyy -y -b y
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
EXE =
|
|
||||||
LIB = .so
|
|
||||||
OBJ = .o
|
|
||||||
|
|
||||||
MAKE = make
|
|
||||||
AR = gcc
|
|
||||||
ARFLAGS = -shared -o
|
|
||||||
CAT = cat
|
|
||||||
CCS = gcc
|
|
||||||
CCP = mpicc
|
|
||||||
CCD = mpicc
|
|
||||||
CFLAGS = -O3 -DINTSIZE64 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -Drestrict=__restrict
|
|
||||||
CLIBFLAGS = -shared -fPIC
|
|
||||||
LDFLAGS = -Xlinker --no-as-needed -lz -lm -lrt
|
|
||||||
CP = cp
|
|
||||||
LEX = flex -Pscotchyy -olex.yy.c
|
|
||||||
LN = ln
|
|
||||||
MKDIR = mkdir
|
|
||||||
MV = mv
|
|
||||||
RANLIB = echo
|
|
||||||
YACC = bison -pscotchyy -y -b y
|
|
||||||
217
makeADIOS
Executable file
217
makeADIOS
Executable file
@ -0,0 +1,217 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM.
|
||||||
|
#
|
||||||
|
# OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
# for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# makeADIOS
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Build script for ADIOS (and MXML)
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
adiosPACKAGE=adios-git
|
||||||
|
mxmlPACKAGE=mxml-2.9
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# run from third-party directory only
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
||||||
|
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " The environment variables are inconsistent with the installation."
|
||||||
|
echo " Check the OpenFOAM entries in your dot-files and source them."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
. etc/tools/ThirdPartyFunctions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
exec 1>&2
|
||||||
|
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||||
|
cat<<USAGE
|
||||||
|
|
||||||
|
usage: ${0##*/} [OPTION] [adios-VERSION] [mxml-VERSION]
|
||||||
|
options:
|
||||||
|
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||||
|
-help
|
||||||
|
|
||||||
|
* Build ADIOS+MXML
|
||||||
|
$adiosPACKAGE
|
||||||
|
$mxmlPACKAGE
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ensure configure gets the correct C/C++ compiler
|
||||||
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
|
||||||
|
|
||||||
|
# parse options
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
-h | -help)
|
||||||
|
usage
|
||||||
|
;;
|
||||||
|
-gcc)
|
||||||
|
export CC=gcc # use gcc/g++
|
||||||
|
export CXX=g++
|
||||||
|
;;
|
||||||
|
adios-[1-9]* | adios-git)
|
||||||
|
adiosPACKAGE="${1%%/}"
|
||||||
|
;;
|
||||||
|
mxml-[1-9]*)
|
||||||
|
mxmlPACKAGE="${1%%/}"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
die "unknown option/argument: '$1'"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
MXML_ARCH_PATH=$installBASE/$mxmlPACKAGE
|
||||||
|
ADIOS_ARCH_PATH=$installBASE/$adiosPACKAGE
|
||||||
|
|
||||||
|
# build MXML - not needed with more recent ADIOS
|
||||||
|
if false
|
||||||
|
then
|
||||||
|
echo
|
||||||
|
echo ========================================
|
||||||
|
echo "Build mxml library $mxmlPACKAGE"
|
||||||
|
echo
|
||||||
|
|
||||||
|
if [ -f $MXML_ARCH_PATH/include/mxml.h \
|
||||||
|
-a -r $FOAM_EXT_LIBBIN/libmxml.so ]
|
||||||
|
then
|
||||||
|
echo " MXML header in $MXML_ARCH_PATH/include"
|
||||||
|
echo " MXML libs in $FOAM_EXT_LIBBIN"
|
||||||
|
echo
|
||||||
|
else
|
||||||
|
(
|
||||||
|
# use mxml packaged with adios (if possible)
|
||||||
|
# or revert to top-level
|
||||||
|
sourceDIR=$WM_THIRD_PARTY_DIR/$adiosPACKAGE/src/mxml/$mxmlPACKAGE
|
||||||
|
[ -d "$sourceDIR" ] || sourceDIR=$WM_THIRD_PARTY_DIR/$mxmlPACKAGE
|
||||||
|
|
||||||
|
cd $sourceDIR || exit 1
|
||||||
|
|
||||||
|
# Remove any existing build folder and recreate
|
||||||
|
\rm -rf $buildDIR 2>/dev/null
|
||||||
|
mkdir -p $buildDIR
|
||||||
|
|
||||||
|
[ -e Makefile ] && make clean 2>/dev/null # for safety
|
||||||
|
mkdir -p $FOAM_EXT_LIBBIN 2>/dev/null
|
||||||
|
|
||||||
|
# handle non-gcc compilers
|
||||||
|
unset configEnv
|
||||||
|
if [ "${WM_CC:-gcc}" != gcc ]
|
||||||
|
then
|
||||||
|
export CC=$WM_CC
|
||||||
|
export CCS=$WM_CC
|
||||||
|
fi
|
||||||
|
|
||||||
|
# installs into lib64/
|
||||||
|
cd $buildDIR && \
|
||||||
|
$sourceDIR/configure --prefix=$MXML_ARCH_PATH \
|
||||||
|
&& make -j $WM_NCOMPPROCS all \
|
||||||
|
&& make install \
|
||||||
|
&& echo "Built: $mxmlPACKAGE" \
|
||||||
|
&& rsync -a $MXML_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/*.so* $FOAM_EXT_LIBBIN/
|
||||||
|
) || {
|
||||||
|
echo "Error building: $mxmlPACKAGE"
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# build ADIOS
|
||||||
|
echo
|
||||||
|
echo ========================================
|
||||||
|
echo "Build adios library $adiosPACKAGE"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Needs future adjustment for shared library, for mpi-specific library location
|
||||||
|
if [ -f $ADIOS_ARCH_PATH/include/adios.h \
|
||||||
|
-a -r $FOAM_EXT_LIBBIN/$FOAM_MPI/libadios.so ]
|
||||||
|
then
|
||||||
|
echo " ADIOS header in $ADIOS_ARCH_PATH/include"
|
||||||
|
echo " ADIOS libs in $FOAM_EXT_LIBBIN"
|
||||||
|
echo
|
||||||
|
else
|
||||||
|
(
|
||||||
|
# configuration options:
|
||||||
|
# Start with GridEngine support - builds without external libraries
|
||||||
|
unset configOpt
|
||||||
|
|
||||||
|
# Add InfiniBand support
|
||||||
|
ibDir=/usr/local/ofed
|
||||||
|
if [ -d "$ibDir/include" ]
|
||||||
|
then
|
||||||
|
configOpt="$configOpt --with-infiniband=$ibDir"
|
||||||
|
fi
|
||||||
|
## $configOpt="$configOpt --with-hdf5=..."
|
||||||
|
|
||||||
|
# for externally compiled MXML
|
||||||
|
# configOpt="$configOpt --with-mxml=$MXML_ARCH_PATH"
|
||||||
|
|
||||||
|
# end of configuration options
|
||||||
|
# ----------------------------
|
||||||
|
|
||||||
|
sourceDIR=$WM_THIRD_PARTY_DIR/$adiosPACKAGE
|
||||||
|
buildDIR=$buildBASE/$adiosPACKAGE
|
||||||
|
|
||||||
|
cd $sourceDIR || exit 1
|
||||||
|
export GIT_DIR=$sourceDIR/.git
|
||||||
|
|
||||||
|
# Remove any existing build folder and recreate
|
||||||
|
\rm -rf $buildDIR 2>/dev/null
|
||||||
|
mkdir -p $buildDIR
|
||||||
|
|
||||||
|
[ -e Makefile ] && make clean 2>/dev/null # for safety
|
||||||
|
|
||||||
|
[ -f configure ] || {
|
||||||
|
echo "no configure for $adiosPACKAGE ... trying autogen"
|
||||||
|
./autogen.sh
|
||||||
|
}
|
||||||
|
|
||||||
|
# installs into lib64/
|
||||||
|
cd $buildDIR && \
|
||||||
|
CC=mpicc CXX=mpicxx CFLAGS="-fPIC" $sourceDIR/configure \
|
||||||
|
--prefix=$ADIOS_ARCH_PATH \
|
||||||
|
--disable-fortran \
|
||||||
|
--with-pic \
|
||||||
|
--without-fastbit \
|
||||||
|
$configOpt \
|
||||||
|
&& make -j $WM_NCOMPPROCS all \
|
||||||
|
&& make install \
|
||||||
|
&& echo "Built: $adiosPACKAGE" \
|
||||||
|
&& rsync -a --no-r $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/ $FOAM_EXT_LIBBIN/$FOAM_MPI/
|
||||||
|
) || {
|
||||||
|
echo "Error building: $adiosPACKAGE"
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
139
makeCCMIO
Executable file
139
makeCCMIO
Executable file
@ -0,0 +1,139 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM.
|
||||||
|
#
|
||||||
|
# OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
# for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# makeCCMIO
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Build CD-adapco's ccmio library
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Get version info
|
||||||
|
. $WM_PROJECT_DIR/etc/config.sh/functions
|
||||||
|
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/ccmio)
|
||||||
|
|
||||||
|
ccmioPACKAGE=${ccmio_version:-libccmio-2.6.1}
|
||||||
|
targetType=lib
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# run from third-party directory only
|
||||||
|
cd ${0%/*} || exit 1
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
||||||
|
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " The environment variables are inconsistent with the installation."
|
||||||
|
echo " Check the OpenFOAM entries in your dot-files and source them."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
[ -n "$FOAM_EXT_LIBBIN" ] || {
|
||||||
|
echo "Error: FOAM_EXT_LIBBIN not set"
|
||||||
|
echo " Check the OpenFOAM entries in your dot-files and source them."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
. etc/tools/ThirdPartyFunctions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
usage()
|
||||||
|
{
|
||||||
|
exec 1>&2
|
||||||
|
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||||
|
/bin/cat<<USAGE
|
||||||
|
|
||||||
|
Usage: ${0##*/} [OPTION] [lib|libso] [libccmio-VERSION]
|
||||||
|
options:
|
||||||
|
-help
|
||||||
|
|
||||||
|
* Compile the proprietary libccmio library
|
||||||
|
$ccmioPACKAGE
|
||||||
|
|
||||||
|
Users wishing to make use of the library should contact cd-adapco
|
||||||
|
(Siemens PLM) for possible download and terms of use.
|
||||||
|
|
||||||
|
After obtaining the $ccmioPACKAGE library, place in folder
|
||||||
|
|
||||||
|
$WM_THIRD_PARTY_DIR/$ccmioPACKAGE/
|
||||||
|
|
||||||
|
prior to running this script.
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Parse options
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
-h | -help)
|
||||||
|
usage
|
||||||
|
;;
|
||||||
|
lib|libso)
|
||||||
|
targetType="$1"
|
||||||
|
;;
|
||||||
|
libccmio-[1-9]*)
|
||||||
|
ccmioPACKAGE="${1%%/}"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
die "unknown option/argument: '$1'"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
# assert: directory must be available
|
||||||
|
[ -d "${ccmioPACKAGE}" ] || die "missing source directory '$ccmioPACKAGE'"
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
CCMIO_ARCH_PATH=$installBASE/$ccmioPACKAGE
|
||||||
|
|
||||||
|
#
|
||||||
|
# Build LIBCCMIO
|
||||||
|
#
|
||||||
|
echo "---------------"
|
||||||
|
(
|
||||||
|
cd $ccmioPACKAGE || exit 1
|
||||||
|
incDIR=$CCMIO_ARCH_PATH/include/libccmio
|
||||||
|
libDIR=$CCMIO_ARCH_PATH/lib
|
||||||
|
|
||||||
|
mkdir -p $incDIR 2>/dev/null
|
||||||
|
mkdir -p $libDIR 2>/dev/null
|
||||||
|
|
||||||
|
cpMakeFiles libccmio 2>/dev/null
|
||||||
|
set +x
|
||||||
|
if wmake $targetType
|
||||||
|
then
|
||||||
|
# make headers available:
|
||||||
|
/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
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
246
makeCGAL
246
makeCGAL
@ -3,8 +3,8 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
@ -34,18 +34,22 @@
|
|||||||
# simply specify a 'system' version. For example,
|
# simply specify a 'system' version. For example,
|
||||||
# makeCGAL boost-system gmp-system
|
# makeCGAL boost-system gmp-system
|
||||||
#
|
#
|
||||||
# Mixing system and ThirdParty for gmp/mpfr is not supported.
|
|
||||||
#
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
set -x
|
|
||||||
|
|
||||||
cgalPACKAGE=CGAL-4.7
|
# Get CGAL, boost and gmp/mpfr versions
|
||||||
boostPACKAGE=boost-system
|
. $WM_PROJECT_DIR/etc/config.sh/functions
|
||||||
gmpPACKAGE=gmp-system
|
unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only
|
||||||
mpfrPACKAGE=mpfr-system
|
|
||||||
|
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL)
|
||||||
|
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/compiler)
|
||||||
|
|
||||||
|
boostPACKAGE=${boost_version:-boost-system}
|
||||||
|
gmpPACKAGE=${gmp_version:-gmp-system}
|
||||||
|
mpfrPACKAGE=${mpfr_version:-mpfr-system}
|
||||||
|
cgalPACKAGE=$cgal_version
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# run from third-party directory only
|
# Run from third-party directory only
|
||||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
||||||
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
||||||
echo " The environment variables are inconsistent with the installation."
|
echo " The environment variables are inconsistent with the installation."
|
||||||
@ -54,77 +58,97 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
|||||||
}
|
}
|
||||||
. etc/tools/ThirdPartyFunctions
|
. etc/tools/ThirdPartyFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
Script="${0##*/}"
|
||||||
|
|
||||||
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] [CGAL-VERSION] [boost-VERSION] [gmp-VERSION] [mpfr-VERSION]
|
usage: $Script [OPTION] [CGAL-VERSION] [boost-VERSION] [gmp-VERSION] [mpfr-VERSION]
|
||||||
options:
|
options:
|
||||||
-gcc force g++ instead of the value from \$WM_CXX
|
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||||
|
-system use system versions for boost/gmp/mpfr
|
||||||
-help
|
-help
|
||||||
|
|
||||||
* build CGAL with
|
* build CGAL with
|
||||||
$cgalPACKAGE
|
${cgalPACKAGE:-'unspecified CGAL version'}
|
||||||
$boostPACKAGE
|
$boostPACKAGE
|
||||||
$gmpPACKAGE
|
$gmpPACKAGE
|
||||||
$mpfrPACKAGE
|
$mpfrPACKAGE
|
||||||
|
|
||||||
Normally builds against ThirdParty boost and gmp/mpfr when possible.
|
Normally builds against ThirdParty boost and gmp/mpfr when possible.
|
||||||
To override this behaviour (and use the system boost and/o gmp/mpfr),
|
To override this behaviour (and use the system boost and/or gmp/mpfr),
|
||||||
simply specify a 'system' version. For example,
|
simply specify a 'system' version. For example,
|
||||||
${0##*/} boost-system gmp-system
|
$Script boost-system gmp-system
|
||||||
|
|
||||||
Note: mixing system and ThirdParty for gmp/mpfr is not supported.
|
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Ensure CMake gets the correct C/C++ compiler
|
||||||
# ensure CMake gets the correct C++ compiler
|
[ -n "$WM_CC" ] && export CC="$WM_CCX"
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
|
||||||
|
# Parse options
|
||||||
# parse options
|
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
-h | -help)
|
||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
|
'')
|
||||||
|
# discard empty arguments
|
||||||
|
;;
|
||||||
-gcc)
|
-gcc)
|
||||||
export CXX=g++ # use g++
|
export CC=gcc # use gcc/g++
|
||||||
shift
|
export CXX=g++
|
||||||
;;
|
;;
|
||||||
gmp-[4-9]* | gmp-sys*)
|
-sys*)
|
||||||
|
gmpPACKAGE="gmp-system"
|
||||||
|
mpfrPACKAGE="mpfr-system"
|
||||||
|
boostPACKAGE="boost-system"
|
||||||
|
;;
|
||||||
|
gmp-[4-9]* | gmp-system)
|
||||||
gmpPACKAGE="${1%%/}"
|
gmpPACKAGE="${1%%/}"
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
mpfr-[2-9]* | mpfr-sys*)
|
mpfr-[2-9]* | mpfr-system)
|
||||||
mpfrPACKAGE="${1%%/}"
|
mpfrPACKAGE="${1%%/}"
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
CGAL-[0-9]*)
|
CGAL-[0-9]*)
|
||||||
cgalPACKAGE="${1%%/}"
|
cgalPACKAGE="${1%%/}"
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
boost-[0-9]* | boost_[0-9]* | boost-sys* )
|
boost-[0-9]* | boost_[0-9]* | boost-system )
|
||||||
boostPACKAGE="${1%%/}"
|
boostPACKAGE="${1%%/}"
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage "unknown option/argument: '$*'"
|
die "unknown option/argument: '$1'"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[ -n "$cgalPACKAGE" ] || die "The cgal-VERSION was not specified"
|
||||||
|
|
||||||
|
# nothing to build
|
||||||
|
if _foamIsNone "$boostPACKAGE"
|
||||||
|
then
|
||||||
|
echo "Using boost-none (skip ThirdParty build of BOOST/CGAL)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
if _foamIsNone "$cgalPACKAGE"
|
||||||
|
then
|
||||||
|
echo "Using cgal-none (skip ThirdParty build of CGAL)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
#
|
#
|
||||||
# Build Boost
|
# Build Boost
|
||||||
|
# For 64-bit
|
||||||
|
# - Third-Party builds into 'lib'
|
||||||
|
# - system is normally built into 'lib64'
|
||||||
#
|
#
|
||||||
# BOOST_SOURCE_DIR : location of the original sources
|
# BOOST_SOURCE_DIR : location of the original sources
|
||||||
|
|
||||||
@ -135,12 +159,19 @@ if [ -d "$BOOST_ARCH_PATH" ]
|
|||||||
then
|
then
|
||||||
boostInc="$BOOST_ARCH_PATH/include"
|
boostInc="$BOOST_ARCH_PATH/include"
|
||||||
boostLib="$BOOST_ARCH_PATH/lib"
|
boostLib="$BOOST_ARCH_PATH/lib"
|
||||||
elif [ -d "$BOOST_SOURCE_DIR" ]
|
elif _foamIsSystem $BOOST_ARCH_PATH
|
||||||
then
|
then
|
||||||
|
echo "Using boost-system (skip ThirdParty build of BOOST)"
|
||||||
|
|
||||||
|
boostInc="/usr/include"
|
||||||
|
boostLib="/usr/lib$WM_COMPILER_LIB_ARCH"
|
||||||
|
else
|
||||||
|
echo "Starting build: boost"
|
||||||
|
echo
|
||||||
|
|
||||||
boostInc="$BOOST_ARCH_PATH/include"
|
boostInc="$BOOST_ARCH_PATH/include"
|
||||||
boostLib="$BOOST_ARCH_PATH/lib"
|
boostLib="$BOOST_ARCH_PATH/lib"
|
||||||
|
|
||||||
echo "Starting build: boost"
|
|
||||||
(
|
(
|
||||||
cd $BOOST_SOURCE_DIR || exit 1
|
cd $BOOST_SOURCE_DIR || exit 1
|
||||||
|
|
||||||
@ -156,33 +187,47 @@ then
|
|||||||
echo "Error building: boost"
|
echo "Error building: boost"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
else
|
fi
|
||||||
boostInc="/usr/include"
|
|
||||||
|
|
||||||
# for completeness:
|
# nothing left to build
|
||||||
# 64-bit needs lib64, but 32-bit needs lib (not lib32)
|
if _foamIsSystem "$cgalPACKAGE"
|
||||||
if [ "$WM_ARCH_OPTION" = 64 ]
|
then
|
||||||
then
|
echo "Using cgal-system (skip ThirdParty build of CGAL)"
|
||||||
boostLib="/usr/lib$WM_ARCH_OPTION"
|
exit 0
|
||||||
else
|
|
||||||
boostLib="/usr/lib"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# retrieve boost version:
|
# Retrieve boost version:
|
||||||
if [ -f "$boostInc/boost/version.hpp" ]
|
if [ -f "$boostInc/boost/version.hpp" ]
|
||||||
then
|
then
|
||||||
BOOST_VERSION_NO=`sed -ne 's/^#define *BOOST_VERSION *\([0-9][0-9]*\).*$/\1/p' $boostInc/boost/version.hpp`
|
BOOST_VERSION=$(sed -ne 's/^ *# *define *BOOST_VERSION *\([0-9][0-9]*\).*$/\1/p' $boostInc/boost/version.hpp)
|
||||||
else
|
else
|
||||||
echo "Boost does not appear to be installed"
|
echo
|
||||||
|
echo "ERROR: boost does not appear to be installed, but is required to build CGAL"
|
||||||
|
echo " Change your settings, or disable entirely (with cgal-system, cgal-none, boost-none)"
|
||||||
echo "stopping build"
|
echo "stopping build"
|
||||||
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
cat<<SUMMARY
|
||||||
|
CGAL configuration
|
||||||
|
------------------
|
||||||
|
CGAL = $cgalPACKAGE
|
||||||
|
BOOST = $boostPACKAGE
|
||||||
|
GMP = $gmpPACKAGE
|
||||||
|
MPFR = $mpfrPACKAGE
|
||||||
|
------------------
|
||||||
|
SUMMARY
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Build CGAL
|
# Build CGAL
|
||||||
|
# For 64-bit
|
||||||
|
# - Third-Party builds into 'lib'
|
||||||
|
# - system is normally built into 'lib64'
|
||||||
#
|
#
|
||||||
# CGAL_SOURCE_DIR : location of the original sources
|
# CGAL_SOURCE_DIR : location of the original sources
|
||||||
# CGAL_BINARY_DIR : location of the build
|
# CGAL_BINARY_DIR : location of the build
|
||||||
@ -200,8 +245,69 @@ installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
|||||||
GMP_ARCH_PATH=$installBASE/$gmpPACKAGE
|
GMP_ARCH_PATH=$installBASE/$gmpPACKAGE
|
||||||
MPFR_ARCH_PATH=$installBASE/$mpfrPACKAGE
|
MPFR_ARCH_PATH=$installBASE/$mpfrPACKAGE
|
||||||
|
|
||||||
|
#
|
||||||
|
# build information recorded for later use
|
||||||
|
#
|
||||||
|
buildInfoFile=$CGAL_ARCH_PATH/share/openfoam-build
|
||||||
|
|
||||||
|
recordCGALinfo()
|
||||||
|
{
|
||||||
|
CGAL_VERSION=$(sed -ne 's/^ *# *define *CGAL_VERSION_NR *\([0-9][0-9]*\).*$/\1/p' $CGAL_ARCH_PATH/include/CGAL/version.h 2>/dev/null)
|
||||||
|
|
||||||
|
cat<<BUILD_INFO > $buildInfoFile
|
||||||
|
CGAL=${CGAL_ARCH_PATH##*/}
|
||||||
|
BOOST=${BOOST_ARCH_PATH##*/}
|
||||||
|
GMP=${GMP_ARCH_PATH##*/}
|
||||||
|
MPFR=${MPFR_ARCH_PATH##*/}
|
||||||
|
CGAL_VERSION=$CGAL_VERSION
|
||||||
|
BOOST_VERSION=$BOOST_VERSION
|
||||||
|
BUILD_INFO
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# compare expected vs what is extracted as KEY=... in text
|
||||||
|
# $1 = key
|
||||||
|
# $2 = expected
|
||||||
|
# $3 = text to extract from
|
||||||
|
infoValueEq()
|
||||||
|
{
|
||||||
|
local val=$(echo "${3:-unset}" | sed -ne "s/^$1=//p")
|
||||||
|
if [ "$2" = "$val" ]
|
||||||
|
then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo " $1=$2, previous build had $1='${val:-not-found}'"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# needs build
|
||||||
|
cgalIsCurrent()
|
||||||
|
{
|
||||||
|
local info=$(cat $buildInfoFile 2>/dev/null)
|
||||||
|
[ -n "$info" ] || return 1
|
||||||
|
|
||||||
|
echo "checking information from existing build ..."
|
||||||
|
echo " ${CGAL_ARCH_PATH}"
|
||||||
|
|
||||||
|
infoValueEq CGAL "${CGAL_ARCH_PATH##*/}" "$info" || return 1
|
||||||
|
infoValueEq BOOST "${BOOST_ARCH_PATH##*/}" "$info" || return 1
|
||||||
|
infoValueEq GMP "${GMP_ARCH_PATH##*/}" "$info" || return 1
|
||||||
|
infoValueEq MPFR "${MPFR_ARCH_PATH##*/}" "$info" || return 1
|
||||||
|
infoValueEq BOOST_VERSION "${BOOST_VERSION}" "$info" || return 1
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
if cgalIsCurrent
|
||||||
|
then
|
||||||
|
echo " ${CGAL_ARCH_PATH##*/} build appears to be up-to-date - skipping"
|
||||||
|
echo
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
(
|
(
|
||||||
# remove any existing build folder and recreate
|
# Remove any existing build folder and recreate
|
||||||
if [ -d $CGAL_BINARY_DIR ]
|
if [ -d $CGAL_BINARY_DIR ]
|
||||||
then
|
then
|
||||||
echo "removing old build directory"
|
echo "removing old build directory"
|
||||||
@ -212,9 +318,9 @@ MPFR_ARCH_PATH=$installBASE/$mpfrPACKAGE
|
|||||||
|
|
||||||
cd $CGAL_BINARY_DIR || exit 1
|
cd $CGAL_BINARY_DIR || exit 1
|
||||||
|
|
||||||
unset configBoost configGmpMpfr
|
unset configBoost configGmp configMpfr
|
||||||
echo "----"
|
echo "----"
|
||||||
echo "Configuring $cgalPACKAGE with boost $BOOST_VERSION_NO"
|
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_BINARY_DIR"
|
||||||
echo " Target : $CGAL_DIR"
|
echo " Target : $CGAL_DIR"
|
||||||
@ -230,7 +336,7 @@ MPFR_ARCH_PATH=$installBASE/$mpfrPACKAGE
|
|||||||
-DBoost_THREAD_LIBRARY_RELEASE=$boostLib/libboost_thread.so
|
-DBoost_THREAD_LIBRARY_RELEASE=$boostLib/libboost_thread.so
|
||||||
-DBoost_SYSTEM_LIBRARY=$boostLib/libboost_system.so
|
-DBoost_SYSTEM_LIBRARY=$boostLib/libboost_system.so
|
||||||
-DBoost_SYSTEM_LIBRARY_RELEASE=$boostLib/libboost_system.so
|
-DBoost_SYSTEM_LIBRARY_RELEASE=$boostLib/libboost_system.so
|
||||||
-DBoost_VERSION=$BOOST_VERSION_NO
|
-DBoost_VERSION=$BOOST_VERSION
|
||||||
CMAKE_OPTIONS
|
CMAKE_OPTIONS
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
@ -241,22 +347,32 @@ CMAKE_OPTIONS
|
|||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$GMP_ARCH_PATH" -a -d "$MPFR_ARCH_PATH" ]
|
if [ -d "$GMP_ARCH_PATH" ]
|
||||||
then
|
then
|
||||||
echo " ThirdParty : gmp/mpfr"
|
echo " ThirdParty : gmp"
|
||||||
configGmpMpfr=$(cat <<CMAKE_OPTIONS
|
configGmp=$(cat <<CMAKE_OPTIONS
|
||||||
-DGMP_INCLUDE_DIR=$GMP_ARCH_PATH/include
|
-DGMP_INCLUDE_DIR=$GMP_ARCH_PATH/include
|
||||||
-DGMP_LIBRARIES_DIR=$GMP_ARCH_PATH/lib
|
-DGMP_LIBRARIES_DIR=$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
||||||
-DGMP_LIBRARIES=$GMP_ARCH_PATH/lib/libgmp.so
|
-DGMP_LIBRARIES=$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libgmp.so
|
||||||
-DGMPXX_INCLUDE_DIR=$GMP_ARCH_PATH/include
|
-DGMPXX_INCLUDE_DIR=$GMP_ARCH_PATH/include
|
||||||
-DGMPXX_LIBRARIES=$GMP_ARCH_PATH/lib/libgmpxx.so
|
-DGMPXX_LIBRARIES=$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libgmpxx.so
|
||||||
-DMPFR_INCLUDE_DIR=$MPFR_ARCH_PATH/include
|
|
||||||
-DMPFR_LIBRARIES_DIR=$MPFR_ARCH_PATH/lib
|
|
||||||
-DMPFR_LIBRARIES=$MPFR_ARCH_PATH/lib/libmpfr.so
|
|
||||||
CMAKE_OPTIONS
|
CMAKE_OPTIONS
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
echo " system : gmp/mpfr"
|
echo " system : gmp"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d "$MPFR_ARCH_PATH" ]
|
||||||
|
then
|
||||||
|
echo " ThirdParty : mpfr"
|
||||||
|
configMpfr=$(cat <<CMAKE_OPTIONS
|
||||||
|
-DMPFR_INCLUDE_DIR=$MPFR_ARCH_PATH/include
|
||||||
|
-DMPFR_LIBRARIES_DIR=$MPFR_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
||||||
|
-DMPFR_LIBRARIES=$MPFR_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpfr.so
|
||||||
|
CMAKE_OPTIONS
|
||||||
|
)
|
||||||
|
else
|
||||||
|
echo " system : mpfr"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "----"
|
echo "----"
|
||||||
@ -264,7 +380,8 @@ CMAKE_OPTIONS
|
|||||||
cmake \
|
cmake \
|
||||||
-DCMAKE_INSTALL_PREFIX=$CGAL_ARCH_PATH \
|
-DCMAKE_INSTALL_PREFIX=$CGAL_ARCH_PATH \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
$configBoost $configGmpMpfr \
|
-DWITH_CGAL_Qt5=OFF \
|
||||||
|
$configBoost $configGmp $configMpfr \
|
||||||
$CGAL_SOURCE_DIR \
|
$CGAL_SOURCE_DIR \
|
||||||
&& make -j $WM_NCOMPPROCS \
|
&& make -j $WM_NCOMPPROCS \
|
||||||
&& make install || exit 1
|
&& make install || exit 1
|
||||||
@ -284,7 +401,10 @@ CMAKE_OPTIONS
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# record our build-status
|
||||||
|
recordCGALinfo
|
||||||
|
|
||||||
echo "Done CGAL"
|
echo "Done CGAL"
|
||||||
)
|
)
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
33
makeCmake
33
makeCmake
@ -4,7 +4,7 @@
|
|||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
@ -29,7 +29,8 @@
|
|||||||
# Build script for cmake
|
# Build script for cmake
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
cmakePACKAGE=cmake-3.2.1
|
# Special purpose script, no default cmake version.
|
||||||
|
unset cmakePACKAGE
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# run from third-party directory only
|
# run from third-party directory only
|
||||||
@ -49,20 +50,20 @@ usage() {
|
|||||||
|
|
||||||
usage: ${0##*/} [OPTION] [cmake-VERSION]
|
usage: ${0##*/} [OPTION] [cmake-VERSION]
|
||||||
options:
|
options:
|
||||||
-gcc force g++ instead of the value from \$WM_CXX
|
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||||
-help
|
-help
|
||||||
|
|
||||||
* build cmake
|
* build cmake
|
||||||
$cmakePACKAGE
|
${cmakePACKAGE:-'unspecified version'}
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# ensure CMake gets the correct C++ compiler
|
# ensure CMake gets the correct C/CC++ compiler
|
||||||
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
|
||||||
|
|
||||||
|
|
||||||
# parse options
|
# parse options
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
@ -72,29 +73,29 @@ do
|
|||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
-gcc)
|
-gcc)
|
||||||
export CC=gcc # use gcc
|
export CC=gcc # use gcc/g++
|
||||||
export CXX=g++ # use g++
|
export CXX=g++
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
cmake-[1-9]*)
|
cmake-[1-9]*)
|
||||||
cmakePACKAGE="${1%%/}"
|
cmakePACKAGE="${1%%/}"
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage "unknown option/argument: '$*'"
|
die "unknown option/argument: '$1'"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[ -n "$cmakePACKAGE" ] || die "The cmake-VERSION was not specified"
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
prefixDIR=$installBASE/$cmakePACKAGE
|
CMAKE_ARCH_PATH=$installBASE/$cmakePACKAGE
|
||||||
|
|
||||||
#
|
#
|
||||||
# Build CMAKE
|
# Build CMAKE
|
||||||
#
|
#
|
||||||
echo "---------------"
|
echo "---------------"
|
||||||
if [ -d "$prefixDIR" -a -r "$prefixDIR/bin/cmake" ]
|
if [ -d "$CMAKE_ARCH_PATH" -a -r "$CMAKE_ARCH_PATH/bin/cmake" ]
|
||||||
then
|
then
|
||||||
echo "Already built: $cmakePACKAGE"
|
echo "Already built: $cmakePACKAGE"
|
||||||
else
|
else
|
||||||
@ -110,7 +111,7 @@ else
|
|||||||
mkdir -p $buildDIR
|
mkdir -p $buildDIR
|
||||||
cd $buildDIR
|
cd $buildDIR
|
||||||
|
|
||||||
$sourceDIR/bootstrap --prefix=$prefixDIR \
|
$sourceDIR/bootstrap --prefix=$CMAKE_ARCH_PATH \
|
||||||
&& time make -j $WM_NCOMPPROCS \
|
&& time make -j $WM_NCOMPPROCS \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& echo "Built: $cmakePACKAGE"
|
&& echo "Built: $cmakePACKAGE"
|
||||||
@ -120,4 +121,4 @@ else
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
173
makeFFTW
Executable file
173
makeFFTW
Executable file
@ -0,0 +1,173 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM.
|
||||||
|
#
|
||||||
|
# OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
# for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# makeFFTW
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Build script for FFTW
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Get FFTW versions
|
||||||
|
. $WM_PROJECT_DIR/etc/config.sh/functions
|
||||||
|
unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only
|
||||||
|
|
||||||
|
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/FFTW)
|
||||||
|
|
||||||
|
fftwPACKAGE=${fftw_version:-fftw-system}
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Run from third-party directory only
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
||||||
|
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " The environment variables are inconsistent with the installation."
|
||||||
|
echo " Check the OpenFOAM entries in your dot-files and source them."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
. etc/tools/ThirdPartyFunctions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
Script="${0##*/}"
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
exec 1>&2
|
||||||
|
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||||
|
cat<<USAGE
|
||||||
|
|
||||||
|
usage: $Script [OPTION] [fftw-VERSION]
|
||||||
|
options:
|
||||||
|
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||||
|
-help
|
||||||
|
|
||||||
|
* build FFTW with
|
||||||
|
${fftwPACKAGE:-'unspecified FFTW version'}
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# ensure configure gets the correct C/C++ compiler
|
||||||
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
|
||||||
|
# Parse options
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
-h | -help)
|
||||||
|
usage
|
||||||
|
;;
|
||||||
|
'')
|
||||||
|
# discard empty arguments
|
||||||
|
;;
|
||||||
|
-gcc)
|
||||||
|
export CC=gcc # use gcc/g++
|
||||||
|
export CXX=g++
|
||||||
|
;;
|
||||||
|
fftw-[0-9]* | fftw_[0-9]* | fftw-system )
|
||||||
|
fftwPACKAGE="${1%%/}"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
die "unknown option/argument: '$1'"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
[ -n "$fftwPACKAGE" ] || die "The fftw-VERSION was not specified"
|
||||||
|
|
||||||
|
# nothing to build
|
||||||
|
if _foamIsNone "$fftwPACKAGE"
|
||||||
|
then
|
||||||
|
echo "Using fftw-none (skip ThirdParty build of FFTW)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if _foamIsSystem "$fftwPACKAGE"
|
||||||
|
then
|
||||||
|
echo "Using fftw-system (skip ThirdParty build of FFTW)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Build FFTW
|
||||||
|
# For 64-bit
|
||||||
|
# - FFTW itself will normally build into 'lib64',
|
||||||
|
# but provide --libdir on configure to be 100% certain
|
||||||
|
# - Third-Party builds into 'lib64'
|
||||||
|
# - system is normally built into 'lib64'
|
||||||
|
#
|
||||||
|
# FFTW_SOURCE_DIR : location of the original sources
|
||||||
|
|
||||||
|
FFTW_ARCH_PATH=$installBASE/$fftwPACKAGE
|
||||||
|
FFTW_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$fftwPACKAGE
|
||||||
|
|
||||||
|
if [ -r "$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libfftw3.so" ]
|
||||||
|
then
|
||||||
|
echo "Already has FFTW shared library"
|
||||||
|
else
|
||||||
|
echo "Starting build: FFTW ($fftwPACKAGE)"
|
||||||
|
echo
|
||||||
|
|
||||||
|
(
|
||||||
|
# configuration options:
|
||||||
|
unset configOpt
|
||||||
|
|
||||||
|
# Single-precision needed?
|
||||||
|
if [ "${WM_PRECISION_OPTION}" = SP ]
|
||||||
|
then
|
||||||
|
configOpt="$configOpt --enable-single"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# end of configuration options
|
||||||
|
# ----------------------------
|
||||||
|
buildDIR=$buildBASE/$fftwPACKAGE
|
||||||
|
|
||||||
|
cd $FFTW_SOURCE_DIR || exit 1
|
||||||
|
|
||||||
|
rm -rf $FFTW_ARCH_PATH
|
||||||
|
rm -rf $buildDIR
|
||||||
|
mkdir -p $buildDIR
|
||||||
|
cd $buildDIR
|
||||||
|
|
||||||
|
set -x
|
||||||
|
$FFTW_SOURCE_DIR/configure \
|
||||||
|
--prefix=$FFTW_ARCH_PATH \
|
||||||
|
--libdir=$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
|
||||||
|
--enable-shared --disable-static \
|
||||||
|
--disable-fortran \
|
||||||
|
$configOpt \
|
||||||
|
&& make -j $WM_NCOMPPROCS \
|
||||||
|
&& make install \
|
||||||
|
&& echo "Built $fftwPACKAGE"
|
||||||
|
) || {
|
||||||
|
echo "Error building: FFTW"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
201
makeGcc
201
makeGcc
@ -3,8 +3,8 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
@ -26,13 +26,32 @@
|
|||||||
# makeGcc
|
# makeGcc
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Build script for gmp, mpfr and gcc-[4-9].?.?
|
# Build script gcc and gmp, mpfr, mpc.
|
||||||
|
#
|
||||||
|
# To force building against the system gmp/mpfr/mpc libraries,
|
||||||
|
# use a corresponding '*-system' version. For example,
|
||||||
|
#
|
||||||
|
# makeGcc gmp-system
|
||||||
|
#
|
||||||
|
# or use the '-system' options to use system libraries everywhere.
|
||||||
|
#
|
||||||
|
# The WM_COMPILER value can also be used specify a known gcc version.
|
||||||
|
# For example (also compiling against system gmp/mpfr/mpc),
|
||||||
|
#
|
||||||
|
# WM_COMPILER=Gcc51 ./makeGcc -system
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
gmpPACKAGE=gmp-5.1.2
|
# get default GCC, mpfr, gmp and mpc versions
|
||||||
mpfrPACKAGE=mpfr-3.1.2
|
WM_COMPILER_TYPE=ThirdParty # ensure we get the correct compiler settings
|
||||||
mpcPACKAGE=mpc-1.0.1
|
: ${WM_COMPILER:=Gcc} # this will still fail if 'Clang' was set
|
||||||
gccPACKAGE=
|
|
||||||
|
. $WM_PROJECT_DIR/etc/config.sh/functions
|
||||||
|
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/compiler)
|
||||||
|
|
||||||
|
gmpPACKAGE=${gmp_version:-gmp-system}
|
||||||
|
mpfrPACKAGE=${mpfr_version:-mpfr-system}
|
||||||
|
mpcPACKAGE=${mpc_version:-mpc-system}
|
||||||
|
gccPACKAGE=$gcc_version
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
# Run from third-party directory only
|
||||||
@ -44,24 +63,35 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
|||||||
}
|
}
|
||||||
. etc/tools/ThirdPartyFunctions
|
. etc/tools/ThirdPartyFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
Script=${0##*/}
|
||||||
|
|
||||||
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##*/} [gmp-VERSION] [mpfr-VERSION] [mpc-VERSION] <gcc-VERSION>
|
usage: $Script [OPTION] [gcc-VERSION] [gmp-VERSION] [mpfr-VERSION] [mpc-VERSION]
|
||||||
|
options:
|
||||||
|
-multilib for 64-bit systems with 32-bit support required
|
||||||
|
-no-multilib for 64-bit systems without 32-bit support (DEFAULT)
|
||||||
|
-no-threadsafe disable mpfr thread-safe (default is auto-detect)
|
||||||
|
-system use system versions for gmp/mpfr/mpc
|
||||||
|
-help
|
||||||
|
|
||||||
* build combinations of gmp, mpfr, mpc and gcc
|
* build combinations of gmp, mpfr, mpc and gcc
|
||||||
$gmpPACKAGE
|
$gmpPACKAGE
|
||||||
$mpfrPACKAGE
|
$mpfrPACKAGE
|
||||||
$mpcPACKAGE
|
$mpcPACKAGE
|
||||||
$gccPACKAGE
|
${gccPACKAGE:-'unspecified GCC version'}
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# build 32-bit libraries on 64-bit systems (normally not needed)
|
||||||
|
optMultilib=disable
|
||||||
|
unset optThreadSafe # unset=auto
|
||||||
|
|
||||||
# Parse options
|
# Parse options
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
@ -70,34 +100,50 @@ do
|
|||||||
-h | -help)
|
-h | -help)
|
||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
gmp-[4-9]*)
|
-multi*)
|
||||||
|
optMultilib=enable
|
||||||
|
;;
|
||||||
|
-no-multi*)
|
||||||
|
optMultilib=disable
|
||||||
|
;;
|
||||||
|
-no-thread*)
|
||||||
|
optThreadSafe=disable
|
||||||
|
;;
|
||||||
|
-sys*)
|
||||||
|
gmpPACKAGE="gmp-system"
|
||||||
|
mpfrPACKAGE="mpfr-system"
|
||||||
|
mpcPACKAGE="mpc-system"
|
||||||
|
;;
|
||||||
|
gmp-[4-9]* | gmp-system)
|
||||||
gmpPACKAGE="${1%%/}"
|
gmpPACKAGE="${1%%/}"
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
mpfr-[2-9]*)
|
mpfr-[2-9]* | mpfr-system)
|
||||||
mpfrPACKAGE="${1%%/}"
|
mpfrPACKAGE="${1%%/}"
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
mpc-[0-9]*)
|
mpc-[0-9]* | mpc-system)
|
||||||
mpcPACKAGE="${1%%/}"
|
mpcPACKAGE="${1%%/}"
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
gcc-[4-9]*)
|
gcc-[4-9]* | gcc-system)
|
||||||
gccPACKAGE="${1%%/}"
|
gccPACKAGE="${1%%/}"
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage "unknown option/argument: '$*'"
|
die "unknown option/argument: '$1'"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -z "$gccPACKAGE" ]
|
[ -n "$gccPACKAGE" ] || die "The gcc-VERSION was not specified"
|
||||||
then
|
|
||||||
usage "Please specify gcc-VERSION"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
cat<<SUMMARY
|
||||||
|
GCC configuration
|
||||||
|
------------------
|
||||||
|
GCC = $gccPACKAGE
|
||||||
|
GMP = $gmpPACKAGE
|
||||||
|
MPFR = $mpfrPACKAGE
|
||||||
|
MPC = $mpcPACKAGE
|
||||||
|
------------------
|
||||||
|
SUMMARY
|
||||||
|
|
||||||
# Set 32 or 64 bit ABI
|
# Set 32 or 64 bit ABI
|
||||||
case "$WM_ARCH_OPTION" in
|
case "$WM_ARCH_OPTION" in
|
||||||
@ -105,7 +151,7 @@ case "$WM_ARCH_OPTION" in
|
|||||||
ABI=$WM_ARCH_OPTION
|
ABI=$WM_ARCH_OPTION
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage "Please set WM_ARCH_OPTION to either 32 or 64'$*'"
|
die "The WM_ARCH_OPTION ($WM_ARCH_OPTION) must be 32 or 64"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@ -120,20 +166,17 @@ 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
|
||||||
|
|
||||||
# mpc is not needed for gcc older than 4.5
|
|
||||||
case "$gccPACKAGE" in
|
|
||||||
gcc-4.[0-4].*)
|
|
||||||
mpcPACKAGE=false
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
#
|
# ================
|
||||||
# Build GMP
|
# Build GMP
|
||||||
#
|
# ================
|
||||||
echo "---------------"
|
echo "---------------"
|
||||||
if [ -d $GMP_ARCH_PATH ]
|
if [ -d $GMP_ARCH_PATH ]
|
||||||
then
|
then
|
||||||
echo "Already built: $gmpPACKAGE"
|
echo "Already built: $gmpPACKAGE"
|
||||||
|
elif _foamIsSystem $GMP_ARCH_PATH
|
||||||
|
then
|
||||||
|
echo "Using gmp-system"
|
||||||
else
|
else
|
||||||
echo "Starting build: $gmpPACKAGE"
|
echo "Starting build: $gmpPACKAGE"
|
||||||
echo
|
echo
|
||||||
@ -151,6 +194,7 @@ else
|
|||||||
set -x
|
set -x
|
||||||
$sourceDIR/configure ABI=$ABI \
|
$sourceDIR/configure ABI=$ABI \
|
||||||
--prefix=$GMP_ARCH_PATH \
|
--prefix=$GMP_ARCH_PATH \
|
||||||
|
--libdir=$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
|
||||||
--enable-cxx \
|
--enable-cxx \
|
||||||
&& make -j $WM_NCOMPPROCS \
|
&& make -j $WM_NCOMPPROCS \
|
||||||
&& make install \
|
&& make install \
|
||||||
@ -161,15 +205,30 @@ else
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export LD_LIBRARY_PATH="$GMP_ARCH_PATH/lib:$LD_LIBRARY_PATH"
|
if [ -d "$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" ]
|
||||||
|
then
|
||||||
|
_foamAddLib "$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
|
||||||
|
|
||||||
#
|
configGMP=$(cat <<CONFIG_OPTIONS
|
||||||
|
--with-gmp-include=$GMP_ARCH_PATH/include
|
||||||
|
--with-gmp-lib=$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
||||||
|
CONFIG_OPTIONS
|
||||||
|
)
|
||||||
|
else
|
||||||
|
unset configGMP
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# ================
|
||||||
# Build MPFR
|
# Build MPFR
|
||||||
#
|
# ================
|
||||||
echo "---------------"
|
echo "---------------"
|
||||||
if [ -d $MPFR_ARCH_PATH ]
|
if [ -d $MPFR_ARCH_PATH ]
|
||||||
then
|
then
|
||||||
echo "Already built: $mpfrPACKAGE"
|
echo "Already built: $mpfrPACKAGE"
|
||||||
|
elif _foamIsSystem $MPFR_ARCH_PATH
|
||||||
|
then
|
||||||
|
echo "Using mpfr-system"
|
||||||
else
|
else
|
||||||
echo "Starting build: $mpfrPACKAGE"
|
echo "Starting build: $mpfrPACKAGE"
|
||||||
echo
|
echo
|
||||||
@ -184,10 +243,15 @@ else
|
|||||||
mkdir -p $buildDIR
|
mkdir -p $buildDIR
|
||||||
cd $buildDIR
|
cd $buildDIR
|
||||||
|
|
||||||
|
unset configOpt
|
||||||
|
# explicitly enable/disable thread-safe
|
||||||
|
[ -n "$optThreadSafe" ] && configOpt="--${optThreadSafe}-thread-safe"
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
$sourceDIR/configure ABI=$ABI \
|
$sourceDIR/configure ABI=$ABI \
|
||||||
--prefix=$MPFR_ARCH_PATH \
|
--prefix=$MPFR_ARCH_PATH \
|
||||||
--with-gmp=$GMP_ARCH_PATH \
|
--libdir=$MPFR_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
|
||||||
|
$configGMP $configOpt \
|
||||||
&& make -j $WM_NCOMPPROCS \
|
&& make -j $WM_NCOMPPROCS \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& echo "Built: $mpfrPACKAGE"
|
&& echo "Built: $mpfrPACKAGE"
|
||||||
@ -197,18 +261,30 @@ else
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export LD_LIBRARY_PATH="$MPFR_ARCH_PATH/lib:$LD_LIBRARY_PATH"
|
if [ -d "$MPFR_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" ]
|
||||||
|
then
|
||||||
|
_foamAddLib "$MPFR_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
|
||||||
|
|
||||||
#
|
configMPFR=$(cat <<CONFIG_OPTIONS
|
||||||
# Build mpc
|
--with-mpfr-include=$MPFR_ARCH_PATH/include \
|
||||||
#
|
--with-mpfr-lib=$MPFR_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
||||||
|
CONFIG_OPTIONS
|
||||||
|
)
|
||||||
|
else
|
||||||
|
unset configMPFR
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# ================
|
||||||
|
# Build MPC
|
||||||
|
# ================
|
||||||
echo "---------------"
|
echo "---------------"
|
||||||
if [ -d $MPC_ARCH_PATH ]
|
if [ -d $MPC_ARCH_PATH ]
|
||||||
then
|
then
|
||||||
echo "Already built: $mpcPACKAGE"
|
echo "Already built: $mpcPACKAGE"
|
||||||
elif [ "$mpcPACKAGE" = false ]
|
elif _foamIsSystem $MPC_ARCH_PATH
|
||||||
then
|
then
|
||||||
echo "Skip building mpc - not needed for older gcc versions"
|
echo "Using mpc-system"
|
||||||
else
|
else
|
||||||
echo "Starting build: $mpcPACKAGE"
|
echo "Starting build: $mpcPACKAGE"
|
||||||
echo
|
echo
|
||||||
@ -226,8 +302,8 @@ else
|
|||||||
set -x
|
set -x
|
||||||
$sourceDIR/configure ABI=$ABI \
|
$sourceDIR/configure ABI=$ABI \
|
||||||
--prefix=$MPC_ARCH_PATH \
|
--prefix=$MPC_ARCH_PATH \
|
||||||
--with-gmp=$GMP_ARCH_PATH \
|
--libdir=$MPC_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
|
||||||
--with-mpfr=$MPFR_ARCH_PATH \
|
$configGMP $configMPFR \
|
||||||
&& make -j $WM_NCOMPPROCS \
|
&& make -j $WM_NCOMPPROCS \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& echo "Built: $mpcPACKAGE"
|
&& echo "Built: $mpcPACKAGE"
|
||||||
@ -237,22 +313,34 @@ else
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -d "$MPC_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" ]
|
||||||
if [ -d "$MPC_ARCH_PATH" ]
|
|
||||||
then
|
then
|
||||||
export LD_LIBRARY_PATH="$MPC_ARCH_PATH/lib:$LD_LIBRARY_PATH"
|
_foamAddLib "$MPC_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
|
||||||
|
|
||||||
|
configMPC=$(cat <<CONFIG_OPTIONS
|
||||||
|
--with-mpc-include=$MPC_ARCH_PATH/include \
|
||||||
|
--with-mpc-lib=$MPC_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
||||||
|
CONFIG_OPTIONS
|
||||||
|
)
|
||||||
|
else
|
||||||
|
unset configMPC
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
#
|
# ================
|
||||||
# Build GCC
|
# Build GCC
|
||||||
# might need 32-bit glibc-devel headers to compile
|
# ================
|
||||||
|
# may need 32-bit glibc-devel headers to compile
|
||||||
# E.g. on ubuntu install g++-multilib
|
# E.g. on ubuntu install g++-multilib
|
||||||
|
# or specify -no-multilib on the command-line
|
||||||
#
|
#
|
||||||
echo "---------------"
|
echo "---------------"
|
||||||
if [ -d $GCC_ARCH_PATH ]
|
if [ -d $GCC_ARCH_PATH ]
|
||||||
then
|
then
|
||||||
echo "Already built: $gccPACKAGE"
|
echo "Already built: $gccPACKAGE"
|
||||||
|
elif _foamIsSystem $GCC_ARCH_PATH
|
||||||
|
then
|
||||||
|
echo "Using gcc-system"
|
||||||
else
|
else
|
||||||
echo "Starting build: $gccPACKAGE"
|
echo "Starting build: $gccPACKAGE"
|
||||||
echo
|
echo
|
||||||
@ -263,24 +351,23 @@ else
|
|||||||
cd $sourceDIR || exit 1
|
cd $sourceDIR || exit 1
|
||||||
make distclean 2>/dev/null
|
make distclean 2>/dev/null
|
||||||
|
|
||||||
unset withMpc
|
|
||||||
[ -d "$MPC_ARCH_PATH" ] && withMpc="--with-mpc=$MPC_ARCH_PATH"
|
|
||||||
|
|
||||||
rm -rf $buildDIR
|
rm -rf $buildDIR
|
||||||
mkdir -p $buildDIR
|
mkdir -p $buildDIR
|
||||||
cd $buildDIR
|
cd $buildDIR
|
||||||
|
|
||||||
|
unset configOpt
|
||||||
|
# with/without multi-lib (32-bit support on 64-bit systems)
|
||||||
|
[ -n "$optMultilib" ] && configOpt="--${optMultilib}-multilib"
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
$sourceDIR/configure \
|
$sourceDIR/configure \
|
||||||
--prefix=$GCC_ARCH_PATH \
|
--prefix=$GCC_ARCH_PATH \
|
||||||
--with-gmp=$GMP_ARCH_PATH \
|
|
||||||
--with-mpfr=$MPFR_ARCH_PATH \
|
|
||||||
$withMpc \
|
|
||||||
--with-pkgversion=OpenFOAM \
|
--with-pkgversion=OpenFOAM \
|
||||||
--enable-languages=c,c++ \
|
--enable-languages=c,c++ \
|
||||||
--enable-__cxa_atexit \
|
--enable-__cxa_atexit \
|
||||||
--enable-libstdcxx-allocator=new \
|
--enable-libstdcxx-allocator=new \
|
||||||
--with-system-zlib \
|
--with-system-zlib \
|
||||||
|
$configGMP $configMPFR $configMPC $configOpt \
|
||||||
MAKEINFO=missing \
|
MAKEINFO=missing \
|
||||||
&& make -j $WM_NCOMPPROCS \
|
&& make -j $WM_NCOMPPROCS \
|
||||||
&& make install \
|
&& make install \
|
||||||
@ -292,4 +379,4 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -69,12 +69,12 @@ do
|
|||||||
;;
|
;;
|
||||||
gperftools-[0-9]* | gperftools-svn*)
|
gperftools-[0-9]* | gperftools-svn*)
|
||||||
gperftoolsPACKAGE="${1%%/}"
|
gperftoolsPACKAGE="${1%%/}"
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage "unknown option/argument: '$*'"
|
die "unknown option/argument: '$1'"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
@ -115,4 +115,4 @@ else
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
60
makeLLVM
60
makeLLVM
@ -3,8 +3,8 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
@ -26,18 +26,39 @@
|
|||||||
# makeLLVM
|
# makeLLVM
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Build script for llvm/clang etc.
|
# Build script for llvm, clang etc.
|
||||||
#
|
#
|
||||||
# - Checkout LLVM:
|
# Note
|
||||||
# svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm-svn
|
# - Ensure that you always use matching versions between llvm and clang.
|
||||||
|
# - The LLVM components reside in the LLVM tools/ subdirectory
|
||||||
#
|
#
|
||||||
# - Checkout Clang:
|
# Example, building from svn repository:
|
||||||
# cd llvm-svn/tools
|
# 1) Checkout LLVM:
|
||||||
# svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
|
# svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm-svn
|
||||||
# cd -
|
#
|
||||||
|
# 2) Checkout Clang, in the correct location
|
||||||
|
# cd llvm-svn/tools
|
||||||
|
# svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
|
||||||
|
# cd -
|
||||||
|
#
|
||||||
|
# Example, building from tar files (version 3.8.0)
|
||||||
|
# - Unpack LLVM:
|
||||||
|
# tar -Jvf llvm-3.8.0.src.tar.xz
|
||||||
|
# mv llvm-3.8.0.src llvm-3.8.0
|
||||||
|
#
|
||||||
|
# - Unpack Clang (also know as cfe):
|
||||||
|
# tar -Jvf cfe-3.8.0.src.tar.xz
|
||||||
|
# mv cfe-3.8.0.src llvm-3.8.0/tools/clang
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
llvmPACKAGE=llvm-3.6.0
|
# get default llvm/clang version
|
||||||
|
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
|
||||||
|
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/compiler)
|
||||||
|
|
||||||
|
llvmPACKAGE=$clang_version
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# run from third-party directory only
|
# run from third-party directory only
|
||||||
@ -49,21 +70,25 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
|||||||
}
|
}
|
||||||
. etc/tools/ThirdPartyFunctions
|
. etc/tools/ThirdPartyFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
Script=${0##*/}
|
||||||
|
|
||||||
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##*/} [llvm-VERSION]
|
usage: $Script [OPTION] [llvm-VERSION]
|
||||||
|
options:
|
||||||
|
-help
|
||||||
|
|
||||||
* build llvm/clang
|
* build llvm/clang
|
||||||
$llvmPACKAGE
|
${llvmPACKAGE:-'unspecified LLVM version'}
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
|
||||||
# parse options
|
# parse options
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
@ -74,14 +99,16 @@ do
|
|||||||
;;
|
;;
|
||||||
llvm-[0-9]* | llvm-svn*)
|
llvm-[0-9]* | llvm-svn*)
|
||||||
llvmPACKAGE="${1%%/}"
|
llvmPACKAGE="${1%%/}"
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage "unknown option/argument: '$*'"
|
die "unknown option/argument: '$1'"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[ -n "$llvmPACKAGE" ] || die "The llvm-VERSION was not specified"
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# build/install without compiler name
|
# build/install without compiler name
|
||||||
buildBASE=$WM_THIRD_PARTY_DIR/build/$WM_ARCH$WM_COMPILER_ARCH
|
buildBASE=$WM_THIRD_PARTY_DIR/build/$WM_ARCH$WM_COMPILER_ARCH
|
||||||
@ -120,8 +147,9 @@ else
|
|||||||
set -x
|
set -x
|
||||||
$sourceDIR/configure \
|
$sourceDIR/configure \
|
||||||
--prefix=$LLVM_ARCH_PATH \
|
--prefix=$LLVM_ARCH_PATH \
|
||||||
--with-gcc-toolchain=`which gcc | sed s%/bin/gcc%%` \
|
--with-gcc-toolchain=$(which gcc | sed s%/bin/gcc%%) \
|
||||||
--enable-optimized \
|
--enable-optimized \
|
||||||
|
--enable-shared \
|
||||||
&& make -j $WM_NCOMPPROCS \
|
&& make -j $WM_NCOMPPROCS \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& echo "Built: $llvmPACKAGE"
|
&& echo "Built: $llvmPACKAGE"
|
||||||
@ -131,4 +159,4 @@ else
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
200
makeMesa
Executable file
200
makeMesa
Executable file
@ -0,0 +1,200 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM.
|
||||||
|
#
|
||||||
|
# OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
# for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# makeMesa
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Build script for Mesa
|
||||||
|
#
|
||||||
|
# Note
|
||||||
|
# Building with mesa-12.0.1 failed to install an "osmesa.h" file,
|
||||||
|
# which renders it useless for off-screen VTK.
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
mesaPACKAGE=mesa-11.2.2
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# run from third-party directory only
|
||||||
|
cd ${0%/*} || exit 1
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
||||||
|
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " The environment variables are inconsistent with the installation."
|
||||||
|
echo " Check the OpenFOAM entries in your dot-files and source them."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
. etc/tools/ThirdPartyFunctions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
Script=${0##*/}
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
exec 1>&2
|
||||||
|
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||||
|
cat<<USAGE
|
||||||
|
|
||||||
|
usage: $Script [OPTION] [mesa-VERSION]
|
||||||
|
options:
|
||||||
|
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||||
|
-help
|
||||||
|
|
||||||
|
* build Mesa with
|
||||||
|
${mesaPACKAGE:-'unspecified MESA version'}
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# ensure configure gets the correct C/C++ compiler
|
||||||
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
|
||||||
|
# Non-standard location for clang?
|
||||||
|
unset thirdPartyClang
|
||||||
|
if [ "$WM_COMPILER_TYPE" = ThirdParty -a "$WM_COMPILER" = Clang ]
|
||||||
|
then
|
||||||
|
thirdPartyClang=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# parse options
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
-h | -help)
|
||||||
|
usage
|
||||||
|
;;
|
||||||
|
-gcc)
|
||||||
|
export CC=gcc # use gcc/g++
|
||||||
|
export CXX=g++
|
||||||
|
unset thirdPartyClang
|
||||||
|
;;
|
||||||
|
mesa-*)
|
||||||
|
mesaPACKAGE="${1%%/}"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
die "unknown option/argument: '$1'"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
[ -n "$mesaPACKAGE" ] || die "The mesa-VERSION was not specified"
|
||||||
|
|
||||||
|
# nothing to build
|
||||||
|
if _foamIsNone "$mesaPACKAGE"
|
||||||
|
then
|
||||||
|
echo "Using mesa-none (skip ThirdParty build of MESA)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if _foamIsSystem "$mesaPACKAGE"
|
||||||
|
then
|
||||||
|
echo "Using mesa-system (skip ThirdParty build of MESA)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# locate third-party clang as required
|
||||||
|
if [ "$thirdPartyClang" = true ]
|
||||||
|
then
|
||||||
|
thirdPartyClang=$(command -v clang) || {
|
||||||
|
echo "Error: could not properly locate clang"
|
||||||
|
exit 2
|
||||||
|
}
|
||||||
|
|
||||||
|
# root installation directory
|
||||||
|
thirdPartyClang=${thirdPartyClang%/bin/clang}
|
||||||
|
|
||||||
|
[ -d "$thirdPartyClang" ] || {
|
||||||
|
echo "Error: could not properly locate clang"
|
||||||
|
exit 2
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Build MESA
|
||||||
|
# For 64-bit
|
||||||
|
# - MESA itself will normally build into 'lib64'.
|
||||||
|
#
|
||||||
|
# MESA_SOURCE_DIR : location of the original sources
|
||||||
|
|
||||||
|
MESA_ARCH_PATH=$installBASE/$mesaPACKAGE
|
||||||
|
MESA_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$mesaPACKAGE
|
||||||
|
|
||||||
|
(
|
||||||
|
# configuration options:
|
||||||
|
unset configOpt
|
||||||
|
|
||||||
|
if [ -d "$thirdPartyClang" ]
|
||||||
|
then
|
||||||
|
configOpt="$configOpt --with-llvm-prefix=$thirdPartyClang"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# end of configuration options
|
||||||
|
# ----------------------------
|
||||||
|
buildDIR=$buildBASE/$mesaPACKAGE
|
||||||
|
|
||||||
|
cd $MESA_SOURCE_DIR || exit 1
|
||||||
|
|
||||||
|
# remove any existing build
|
||||||
|
rm -rf $MESA_ARCH_PATH
|
||||||
|
rm -rf $buildDIR
|
||||||
|
mkdir -p $buildDIR
|
||||||
|
cd $buildDIR
|
||||||
|
|
||||||
|
echo "----"
|
||||||
|
echo "Building $mesaPACKAGE"
|
||||||
|
echo " Source : $MESA_SOURCE_DIR"
|
||||||
|
echo " Target : $MESA_ARCH_PATH"
|
||||||
|
if [ -d "$thirdPartyClang" ]
|
||||||
|
then
|
||||||
|
echo " Clang : $thirdPartyClang"
|
||||||
|
fi
|
||||||
|
echo "----"
|
||||||
|
|
||||||
|
# possibly for older mesa versions (see paraview wiki)
|
||||||
|
# CXXFLAGS="-O2 -DDEFAULT_SOFTWARE_DEPTH_BITS=31" \
|
||||||
|
# CFLAGS="-O2 -DDEFAULT_SOFTWARE_DEPTH_BITS=31" \
|
||||||
|
|
||||||
|
## autoreconf -fi
|
||||||
|
set -x
|
||||||
|
$MESA_SOURCE_DIR/configure \
|
||||||
|
--prefix=$MESA_ARCH_PATH \
|
||||||
|
--disable-xvmc \
|
||||||
|
--disable-glx \
|
||||||
|
--disable-dri \
|
||||||
|
--disable-egl \
|
||||||
|
--enable-texture-float \
|
||||||
|
--enable-gallium-osmesa --with-gallium-drivers=swrast \
|
||||||
|
$configOpt \
|
||||||
|
&& make -j $WM_NCOMPPROCS \
|
||||||
|
&& make install \
|
||||||
|
&& echo "Built $mesaPACKAGE"
|
||||||
|
) || {
|
||||||
|
echo "Error building: MESA"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
187
makeParaView
187
makeParaView
@ -3,8 +3,8 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
@ -26,12 +26,21 @@
|
|||||||
# makeParaView
|
# makeParaView
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Make and install paraview for version 3.14.1 and higher
|
# Make and install paraview 4 or 5
|
||||||
# - place the paraview source under $WM_THIRD_PARTY_DIR/ParaView-VERSION
|
# - place the paraview source under $WM_THIRD_PARTY_DIR/ParaView-VERSION
|
||||||
# (note capitalisation)
|
# (note capitalisation)
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# run from third-party directory only
|
# Get ParaView_DIR location from OpenFOAM config file
|
||||||
|
. $WM_PROJECT_DIR/etc/config.sh/functions
|
||||||
|
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/paraview)
|
||||||
|
|
||||||
|
# Determine ParaView_VERSION from ParaView_DIR location:
|
||||||
|
ParaView_VERSION="${ParaView_DIR##*/}"; export ParaView_VERSION
|
||||||
|
: ${ParaView_VERSION##*-}
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Run from third-party directory only
|
||||||
cd ${0%/*} || exit 1
|
cd ${0%/*} || exit 1
|
||||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
||||||
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
||||||
@ -47,6 +56,7 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
|||||||
# ~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~
|
||||||
|
|
||||||
# MPI support:
|
# MPI support:
|
||||||
|
# use 0 or unset MPI_MAX_PROCS for no upper-limit
|
||||||
withMPI=false
|
withMPI=false
|
||||||
MPI_MAX_PROCS=32
|
MPI_MAX_PROCS=32
|
||||||
|
|
||||||
@ -55,12 +65,12 @@ MPI_MAX_PROCS=32
|
|||||||
# If it fails, specify the path using the PYTHON_LIBRARY variable
|
# If it fails, specify the path using the PYTHON_LIBRARY variable
|
||||||
withPYTHON=false
|
withPYTHON=false
|
||||||
PYTHON_LIBRARY=""
|
PYTHON_LIBRARY=""
|
||||||
# PYTHON_LIBRARY="/usr/lib64/libpython2.6.so.1.0"
|
# PYTHON_LIBRARY="/usr/lib$WM_COMPILER_LIB_ARCH/libpython2.6.so.1.0"
|
||||||
|
|
||||||
# MESA graphics support:
|
# MESA graphics support:
|
||||||
withMESA=false
|
withMESA=false
|
||||||
MESA_INCLUDE="/usr/include/GL"
|
MESA_INCLUDE="/usr/include/GL"
|
||||||
MESA_LIBRARY="/usr/lib64/libOSMesa.so"
|
MESA_LIBRARY="/usr/lib$WM_COMPILER_LIB_ARCH/libOSMesa.so"
|
||||||
|
|
||||||
# extra QT gui support (useful for some third party apps)
|
# extra QT gui support (useful for some third party apps)
|
||||||
withQT=true
|
withQT=true
|
||||||
@ -71,6 +81,10 @@ QMAKE_PATH=""
|
|||||||
# Set the path to cmake
|
# Set the path to cmake
|
||||||
CMAKE_PATH=""
|
CMAKE_PATH=""
|
||||||
|
|
||||||
|
# New rendering backend (starting with paraview 5.0).
|
||||||
|
# Default to auto-config based on paraview version
|
||||||
|
withGL2=auto
|
||||||
|
|
||||||
#
|
#
|
||||||
# NO FURTHER EDITING BELOW THIS LINE
|
# NO FURTHER EDITING BELOW THIS LINE
|
||||||
#
|
#
|
||||||
@ -78,39 +92,46 @@ CMAKE_PATH=""
|
|||||||
Script=${0##*/}
|
Script=${0##*/}
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
|
: ${ParaView_VERSION:=none} # some dummy value for usage information
|
||||||
|
exec 1>&2
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||||
cat<<USAGE
|
cat<<USAGE
|
||||||
|
|
||||||
usage: $Script [OPTION] [CMAKE-OPTION]
|
usage: $Script [OPTION] [paraview-VERSION] [CMAKE-OPTION]
|
||||||
options:
|
options:
|
||||||
-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)
|
||||||
-mesa with mesa (if not already enabled)
|
-mesa with mesa (if not already enabled)
|
||||||
-mpi with mpi (if not already enabled)
|
-mpi with mpi (if not already enabled)
|
||||||
|
-mpi=NPROCS with mpi and max 'NPROCS' processes. NPROCS=0 for no
|
||||||
|
upper-limit on processes.
|
||||||
-python with python (if not already enabled)
|
-python with python (if not already enabled)
|
||||||
-cmake PATH with the cmake version corresponding to the cmake path given
|
-cmake PATH with the cmake version corresponding to the cmake 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
|
||||||
-gcc force g++ instead of the value from \$WM_CXX
|
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||||
-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 value: $ParaView_VERSION)
|
||||||
-major VER specify an alternative major version for special builds
|
-major VER specify an alternative major version for special builds
|
||||||
-mesa-include DIR
|
-buildType NAME specify the build type (default: Release)
|
||||||
location of mesa headers (current value: ${MESA_INCLUDE:-none})
|
-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-lib PATH path to mesa library (current value: ${MESA_LIBRARY:-none})
|
-mesa-lib PATH path to mesa library (current value: ${MESA_LIBRARY:-none})
|
||||||
-python-lib PATH path to python library (current value: ${PYTHON_LIBRARY:-none})
|
-python-lib PATH path to python library (current value: ${PYTHON_LIBRARY:-none})
|
||||||
-help
|
-help
|
||||||
|
|
||||||
The -no-FEATURE option can be disable these features (if not already disabled):
|
The -no-FEATURE option can be used to forcibly disable these features:
|
||||||
mesa mpi python qt
|
mesa mpi python qt
|
||||||
|
|
||||||
CMake options start with a capital letter and contain an '='.
|
CMake options start with a capital letter and contain an '='.
|
||||||
For example,
|
For example,
|
||||||
$Script BUILD_TESTING=ON PARAVIEW_GENERATE_PROXY_DOCUMENTATION=OFF
|
$Script BUILD_TESTING=ON
|
||||||
to add tests and avoid building documentation
|
to add tests
|
||||||
|
|
||||||
For finer control, the build stages can be selected or deselected individually:
|
For finer control, the build stages can be selected or deselected individually:
|
||||||
|
-patch -no-patch
|
||||||
-config -no-config
|
-config -no-config
|
||||||
-make -no-make
|
-make -no-make
|
||||||
-install -no-install
|
-install -no-install
|
||||||
@ -120,15 +141,22 @@ For finer control, the build stages can be selected or deselected individually:
|
|||||||
\$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION
|
\$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION
|
||||||
-> \$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-$ParaView_VERSION
|
-> \$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-$ParaView_VERSION
|
||||||
|
|
||||||
|
To make a different paraview version, simply specify on the command-line.
|
||||||
|
For example,
|
||||||
|
|
||||||
|
./makeParaview 4.4.0
|
||||||
|
|
||||||
|
Or change the \$WM_PROJECT_DIR/etc/config.sh/paraview settings.
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# ensure CMake gets the correct C++ compiler
|
# ensure CMake gets the correct C/C++ compiler
|
||||||
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# add options based on script name:
|
# add options based on script name:
|
||||||
@ -138,14 +166,15 @@ case "$Script" in *-mpi*) withMPI=true;; esac
|
|||||||
case "$Script" in *-python*) withPYTHON=true;; esac
|
case "$Script" in *-python*) withPYTHON=true;; esac
|
||||||
case "$Script" in *-qt*) withQT=true;; esac
|
case "$Script" in *-qt*) withQT=true;; esac
|
||||||
|
|
||||||
# set ParaView_MAJOR based on current value of ParaView_VERSION
|
# Set initial ParaView_MAJOR based on current value of ParaView_VERSION
|
||||||
setVersion
|
setParaViewVersion ${ParaView_VERSION:-none}
|
||||||
|
|
||||||
#
|
#
|
||||||
# various building stages
|
# various building stages
|
||||||
#
|
#
|
||||||
unset runCONFIG runMAKE runINSTALL
|
unset runPATCH runCONFIG runMAKE runINSTALL
|
||||||
runDEFAULT=true
|
runDEFAULT=true
|
||||||
|
buildType=Release
|
||||||
|
|
||||||
# parse options
|
# parse options
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
@ -154,131 +183,166 @@ do
|
|||||||
-h | -help)
|
-h | -help)
|
||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
|
[0-9]* | paraview-[0-9]* | ParaView-[0-9]*) # paraview version
|
||||||
|
setParaViewVersion "${1%%/}"
|
||||||
|
;;
|
||||||
[A-Z]*=*) # cmake variables
|
[A-Z]*=*) # cmake variables
|
||||||
addCMakeVariable "$1"
|
addCMakeVariable "$1"
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-gcc)
|
-gcc)
|
||||||
export CXX=g++ # use g++
|
export CC=gcc # use gcc/g++
|
||||||
shift
|
export CXX=g++
|
||||||
|
;;
|
||||||
|
-patch) # stage 0: patch sources
|
||||||
|
runPATCH=true
|
||||||
|
unset runDEFAULT
|
||||||
|
;;
|
||||||
|
-no-patch)
|
||||||
|
runPATCH=false
|
||||||
;;
|
;;
|
||||||
-config) # stage 1: config only
|
-config) # stage 1: config only
|
||||||
runCONFIG=true
|
runCONFIG=true
|
||||||
unset runDEFAULT
|
unset runDEFAULT
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-no-config)
|
-no-config)
|
||||||
runCONFIG=false
|
runCONFIG=false
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-make) # stage 2: make only
|
-make) # stage 2: make only
|
||||||
runMAKE=true
|
runMAKE=true
|
||||||
unset runDEFAULT
|
unset runDEFAULT
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-no-make)
|
-no-make)
|
||||||
runMAKE=false
|
runMAKE=false
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-install) # stage 3: install only
|
-install) # stage 3: install only
|
||||||
runINSTALL=true
|
runINSTALL=true
|
||||||
unset runDEFAULT
|
unset runDEFAULT
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-no-install)
|
-no-install)
|
||||||
runINSTALL=false
|
runINSTALL=false
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-rebuild) # shortcut for rebuilding
|
-rebuild) # shortcut for rebuilding
|
||||||
runMAKE=true
|
runMAKE=true
|
||||||
runINSTALL=true
|
runINSTALL=true
|
||||||
unset runDEFAULT
|
unset runDEFAULT
|
||||||
shift
|
;;
|
||||||
|
-gl2)
|
||||||
|
withGL2=true
|
||||||
|
;;
|
||||||
|
-no-gl2)
|
||||||
|
withGL2=false
|
||||||
;;
|
;;
|
||||||
-mesa)
|
-mesa)
|
||||||
withMESA=true
|
withMESA=true
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-no-mesa)
|
-no-mesa)
|
||||||
withMESA=false
|
withMESA=false
|
||||||
|
;;
|
||||||
|
-mesa-prefix)
|
||||||
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
withMESA=true
|
||||||
|
MESA_INCLUDE="${2%%/}/include"
|
||||||
|
MESA_LIBRARY="${2%%/}/lib$WM_COMPILER_LIB_ARCH/libOSMesa.so"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-mesa-include)
|
-mesa-include)
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
MESA_INCLUDE="$2"
|
MESA_INCLUDE="${2%%/}"
|
||||||
shift 2
|
shift
|
||||||
;;
|
;;
|
||||||
-mesa-lib)
|
-mesa-lib)
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
MESA_LIBRARY="$2"
|
MESA_LIBRARY="${2%%/}"
|
||||||
shift 2
|
shift
|
||||||
;;
|
;;
|
||||||
-mpi)
|
-mpi)
|
||||||
withMPI=true
|
withMPI=true
|
||||||
shift
|
;;
|
||||||
|
-mpi=[0-9]*) # mpi and max mpi processes
|
||||||
|
withMPI=true
|
||||||
|
MPI_MAX_PROCS="${1##*=}"
|
||||||
;;
|
;;
|
||||||
-no-mpi)
|
-no-mpi)
|
||||||
withMPI=false
|
withMPI=false
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-python)
|
-python)
|
||||||
withPYTHON=true
|
withPYTHON=true
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-no-python)
|
-no-python)
|
||||||
withPYTHON=false
|
withPYTHON=false
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-python-lib)
|
-python-lib)
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
PYTHON_LIBRARY="$2"
|
PYTHON_LIBRARY="${2%%/}"
|
||||||
shift 2
|
shift
|
||||||
;;
|
;;
|
||||||
-cmake)
|
-cmake)
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
CMAKE_PATH=$2
|
CMAKE_PATH="${2%%/}"
|
||||||
shift 2
|
shift
|
||||||
;;
|
;;
|
||||||
-qmake)
|
-qmake)
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
QMAKE_PATH=$2
|
QMAKE_PATH="${2%%/}"
|
||||||
shift 2
|
shift
|
||||||
;;
|
;;
|
||||||
-qt)
|
-qt)
|
||||||
withQT=true
|
withQT=true
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-no-qt)
|
-no-qt)
|
||||||
withQT=false
|
withQT=false
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-qt-[1-9]*)
|
-qt-[1-9]*)
|
||||||
QMAKE_PATH="$installBASE/${1##-}"
|
QMAKE_PATH="$installBASE/${1##-}"
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-verbose)
|
-verbose)
|
||||||
withVERBOSE=true
|
withVERBOSE=true
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-version)
|
-version)
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
setVersion "$2"
|
setParaViewVersion "${2%%/}"
|
||||||
shift 2
|
shift
|
||||||
;;
|
;;
|
||||||
-major)
|
-major)
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
export ParaView_MAJOR="$2"
|
export ParaView_MAJOR="$2"
|
||||||
shift 2
|
shift
|
||||||
|
;;
|
||||||
|
-buildType)
|
||||||
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
buildType="$2"
|
||||||
|
shift
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage "unknown option/argument: '$*'"
|
die "unknown option/argument: '$1'"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[ -n "$ParaView_VERSION" ] || die "The paraview-VERSION was not specified"
|
||||||
|
|
||||||
|
# nothing to build
|
||||||
|
if _foamIsNone "$ParaView_VERSION"
|
||||||
|
then
|
||||||
|
echo "Using paraview-none (skip ThirdParty build of ParaView)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Version-specific adjustments
|
||||||
|
if [ "$withGL2" = auto ]
|
||||||
|
then
|
||||||
|
if [ "${ParaView_VERSION%%.*}" = 4 ]
|
||||||
|
then
|
||||||
|
withGL2=false
|
||||||
|
else
|
||||||
|
withGL2=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$runDEFAULT" = true ]
|
if [ "$runDEFAULT" = true ]
|
||||||
then
|
then
|
||||||
|
: ${runPATCH:=true}
|
||||||
: ${runCONFIG:=true}
|
: ${runCONFIG:=true}
|
||||||
: ${runMAKE:=true}
|
: ${runMAKE:=true}
|
||||||
: ${runINSTALL:=true}
|
: ${runINSTALL:=true}
|
||||||
@ -291,10 +355,10 @@ addVerbosity # verbose makefiles
|
|||||||
addMpiSupport # set MPI-specific options
|
addMpiSupport # set MPI-specific options
|
||||||
addPythonSupport # set Python-specific options
|
addPythonSupport # set Python-specific options
|
||||||
addMesaSupport # set MESA-specific options
|
addMesaSupport # set MESA-specific options
|
||||||
|
addGL2Support # new rendering backend
|
||||||
addQtSupport # add extra Qt support
|
addQtSupport # add extra Qt support
|
||||||
|
|
||||||
setDirs # where things are or should be put
|
setParaViewDirs # where things are or should be put
|
||||||
echoDateStamp # report kitware source code date-stamp
|
|
||||||
|
|
||||||
|
|
||||||
# Build and install
|
# Build and install
|
||||||
@ -303,6 +367,7 @@ cat<<SUMMARY
|
|||||||
|
|
||||||
Build stages selected
|
Build stages selected
|
||||||
---------------------
|
---------------------
|
||||||
|
-patch ${runPATCH:-false}
|
||||||
-config ${runCONFIG:-false}
|
-config ${runCONFIG:-false}
|
||||||
-make ${runMAKE:-false}
|
-make ${runMAKE:-false}
|
||||||
-install ${runINSTALL:-false}
|
-install ${runINSTALL:-false}
|
||||||
@ -317,10 +382,12 @@ Version information
|
|||||||
qt ${QtVersion:-none}
|
qt ${QtVersion:-none}
|
||||||
version ${ParaView_VERSION:-unknown}
|
version ${ParaView_VERSION:-unknown}
|
||||||
major ${ParaView_MAJOR:-unknown}
|
major ${ParaView_MAJOR:-unknown}
|
||||||
|
build ${buildType:-Release}
|
||||||
$(checkVersion)
|
$(checkVersion)
|
||||||
---------------------
|
---------------------
|
||||||
SUMMARY
|
SUMMARY
|
||||||
|
|
||||||
|
[ "$runPATCH" = true ] && patchParaView
|
||||||
[ "$runCONFIG" = true ] && configParaView
|
[ "$runCONFIG" = true ] && configParaView
|
||||||
[ "$runMAKE" = true ] && makeParaView
|
[ "$runMAKE" = true ] && makeParaView
|
||||||
[ "$runINSTALL" = true ] && installParaView
|
[ "$runINSTALL" = true ] && installParaView
|
||||||
|
|||||||
13
makeParaView.example
Executable file
13
makeParaView.example
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# An example for building particular combinations of ParaView with
|
||||||
|
# - mpi (0 = no upper-limit on processes)
|
||||||
|
# - off-screen mesa
|
||||||
|
|
||||||
|
mesa=mesa-11.2.2
|
||||||
|
|
||||||
|
./makeParaView \
|
||||||
|
-mpi=0 \
|
||||||
|
-mesa-prefix $WM_THIRD_PARTY_DIR/platforms/linux64Gcc/$mesa \
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
@ -3,8 +3,8 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM.
|
||||||
@ -23,15 +23,24 @@
|
|||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# Script
|
# Script
|
||||||
# makeParaView
|
# makeParaView3
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Make and install paraview
|
# Make and install paraview for version 3.14.1 and higher
|
||||||
# - place the paraview source under $WM_THIRD_PARTY_DIR/ParaView-VERSION
|
# - place the paraview source under $WM_THIRD_PARTY_DIR/ParaView-VERSION
|
||||||
# (note capitalisation)
|
# (note capitalisation)
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# run from third-party directory only
|
# Get ParaView_DIR location from OpenFOAM config file
|
||||||
|
. $WM_PROJECT_DIR/etc/config.sh/functions
|
||||||
|
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/paraview)
|
||||||
|
|
||||||
|
# Determine ParaView_VERSION from ParaView_DIR location:
|
||||||
|
ParaView_VERSION="${ParaView_DIR##*/}"; export ParaView_VERSION
|
||||||
|
: ${ParaView_VERSION##*-}
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Run from third-party directory only
|
||||||
cd ${0%/*} || exit 1
|
cd ${0%/*} || exit 1
|
||||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
||||||
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
||||||
@ -40,7 +49,7 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
. etc/tools/ThirdPartyFunctions
|
. etc/tools/ThirdPartyFunctions
|
||||||
. etc/tools/ParaView4Functions
|
. etc/tools/ParaView3Functions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# USER OPTIONS:
|
# USER OPTIONS:
|
||||||
@ -55,12 +64,12 @@ MPI_MAX_PROCS=32
|
|||||||
# If it fails, specify the path using the PYTHON_LIBRARY variable
|
# If it fails, specify the path using the PYTHON_LIBRARY variable
|
||||||
withPYTHON=false
|
withPYTHON=false
|
||||||
PYTHON_LIBRARY=""
|
PYTHON_LIBRARY=""
|
||||||
# PYTHON_LIBRARY="/usr/lib64/libpython2.6.so.1.0"
|
# PYTHON_LIBRARY="/usr/lib$WM_COMPILER_LIB_ARCH/libpython2.6.so.1.0"
|
||||||
|
|
||||||
# MESA graphics support:
|
# MESA graphics support:
|
||||||
withMESA=false
|
withMESA=false
|
||||||
MESA_INCLUDE="/usr/include/GL"
|
MESA_INCLUDE="/usr/include/GL"
|
||||||
MESA_LIBRARY="/usr/lib64/libOSMesa.so"
|
MESA_LIBRARY="/usr/lib$WM_COMPILER_LIB_ARCH/libOSMesa.so"
|
||||||
|
|
||||||
# extra QT gui support (useful for some third party apps)
|
# extra QT gui support (useful for some third party apps)
|
||||||
withQT=true
|
withQT=true
|
||||||
@ -78,10 +87,12 @@ CMAKE_PATH=""
|
|||||||
Script=${0##*/}
|
Script=${0##*/}
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
|
: ${ParaView_VERSION:=none} # some dummy value for usage information
|
||||||
|
exec 1>&2
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||||
cat<<USAGE
|
cat<<USAGE
|
||||||
|
|
||||||
usage: $Script [OPTION] [CMAKE-OPTION]
|
usage: $Script [OPTION] [paraview-VERSION] [CMAKE-OPTION]
|
||||||
options:
|
options:
|
||||||
-rebuild for repeated builds (-make -install) *use with caution*
|
-rebuild for repeated builds (-make -install) *use with caution*
|
||||||
-mesa with mesa (if not already enabled)
|
-mesa with mesa (if not already enabled)
|
||||||
@ -92,23 +103,22 @@ options:
|
|||||||
-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
|
||||||
-gcc force g++ instead of the value from \$WM_CXX
|
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||||
-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 value: $ParaView_VERSION)
|
||||||
-major VER specify an alternative major version for special builds
|
-major VER specify an alternative major version for special builds
|
||||||
-mesa-include DIR
|
-mesa-include DIR location of mesa headers (current value: ${MESA_INCLUDE:-none})
|
||||||
location of mesa headers (current value: ${MESA_INCLUDE:-none})
|
|
||||||
-mesa-lib PATH path to mesa library (current value: ${MESA_LIBRARY:-none})
|
-mesa-lib PATH path to mesa library (current value: ${MESA_LIBRARY:-none})
|
||||||
-python-lib PATH path to python library (current value: ${PYTHON_LIBRARY:-none})
|
-python-lib PATH path to python library (current value: ${PYTHON_LIBRARY:-none})
|
||||||
-help
|
-help
|
||||||
|
|
||||||
The -no-FEATURE option can be disable these features (if not already disabled):
|
The -no-FEATURE option can be used to forcibly disable these features:
|
||||||
mesa mpi python qt
|
mesa mpi python qt
|
||||||
|
|
||||||
CMake options start with a capital letter and contain an '='.
|
CMake options start with a capital letter and contain an '='.
|
||||||
For example,
|
For example,
|
||||||
$Script BUILD_TESTING=ON
|
$Script BUILD_TESTING=ON PARAVIEW_GENERATE_PROXY_DOCUMENTATION=OFF
|
||||||
to add tests
|
to add tests and avoid building documentation
|
||||||
|
|
||||||
For finer control, the build stages can be selected or deselected individually:
|
For finer control, the build stages can be selected or deselected individually:
|
||||||
-config -no-config
|
-config -no-config
|
||||||
@ -120,15 +130,22 @@ For finer control, the build stages can be selected or deselected individually:
|
|||||||
\$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION
|
\$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION
|
||||||
-> \$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-$ParaView_VERSION
|
-> \$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-$ParaView_VERSION
|
||||||
|
|
||||||
|
To make a different paraview version, simply specify on the command-line.
|
||||||
|
For example,
|
||||||
|
|
||||||
|
./makeParaview 3.14.1
|
||||||
|
|
||||||
|
Or change the \$WM_PROJECT_DIR/etc/config.sh/paraview settings.
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# ensure CMake gets the correct C++ compiler
|
# ensure CMake gets the correct C/C++ compiler
|
||||||
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# add options based on script name:
|
# add options based on script name:
|
||||||
@ -138,15 +155,14 @@ case "$Script" in *-mpi*) withMPI=true;; esac
|
|||||||
case "$Script" in *-python*) withPYTHON=true;; esac
|
case "$Script" in *-python*) withPYTHON=true;; esac
|
||||||
case "$Script" in *-qt*) withQT=true;; esac
|
case "$Script" in *-qt*) withQT=true;; esac
|
||||||
|
|
||||||
# set ParaView_MAJOR based on current value of ParaView_VERSION
|
# Set initial ParaView_MAJOR based on current value of ParaView_VERSION
|
||||||
setVersion
|
setParaViewVersion ${ParaView_VERSION:-none}
|
||||||
|
|
||||||
#
|
#
|
||||||
# various building stages
|
# various building stages
|
||||||
#
|
#
|
||||||
unset runCONFIG runMAKE runINSTALL
|
unset runCONFIG runMAKE runINSTALL
|
||||||
runDEFAULT=true
|
runDEFAULT=true
|
||||||
buildType=Release
|
|
||||||
|
|
||||||
# parse options
|
# parse options
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
@ -155,133 +171,122 @@ do
|
|||||||
-h | -help)
|
-h | -help)
|
||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
|
[0-9]* | paraview-[0-9]* | ParaView-[0-9]*) # paraview version
|
||||||
|
setParaViewVersion "${1%%/}"
|
||||||
|
;;
|
||||||
[A-Z]*=*) # cmake variables
|
[A-Z]*=*) # cmake variables
|
||||||
addCMakeVariable "$1"
|
addCMakeVariable "$1"
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-gcc)
|
-gcc)
|
||||||
export CXX=g++ # use g++
|
export CC=gcc # use gcc/g++
|
||||||
shift
|
export CXX=g++
|
||||||
;;
|
;;
|
||||||
-config) # stage 1: config only
|
-config) # stage 1: config only
|
||||||
runCONFIG=true
|
runCONFIG=true
|
||||||
unset runDEFAULT
|
unset runDEFAULT
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-no-config)
|
-no-config)
|
||||||
runCONFIG=false
|
runCONFIG=false
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-make) # stage 2: make only
|
-make) # stage 2: make only
|
||||||
runMAKE=true
|
runMAKE=true
|
||||||
unset runDEFAULT
|
unset runDEFAULT
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-no-make)
|
-no-make)
|
||||||
runMAKE=false
|
runMAKE=false
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-install) # stage 3: install only
|
-install) # stage 3: install only
|
||||||
runINSTALL=true
|
runINSTALL=true
|
||||||
unset runDEFAULT
|
unset runDEFAULT
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-no-install)
|
-no-install)
|
||||||
runINSTALL=false
|
runINSTALL=false
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-rebuild) # shortcut for rebuilding
|
-rebuild) # shortcut for rebuilding
|
||||||
runMAKE=true
|
runMAKE=true
|
||||||
runINSTALL=true
|
runINSTALL=true
|
||||||
unset runDEFAULT
|
unset runDEFAULT
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-mesa)
|
-mesa)
|
||||||
withMESA=true
|
withMESA=true
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-no-mesa)
|
-no-mesa)
|
||||||
withMESA=false
|
withMESA=false
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-mesa-include)
|
-mesa-include)
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
MESA_INCLUDE="$2"
|
MESA_INCLUDE="$2"
|
||||||
shift 2
|
shift
|
||||||
;;
|
;;
|
||||||
-mesa-lib)
|
-mesa-lib)
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
MESA_LIBRARY="$2"
|
MESA_LIBRARY="$2"
|
||||||
shift 2
|
shift
|
||||||
;;
|
;;
|
||||||
-mpi)
|
-mpi)
|
||||||
withMPI=true
|
withMPI=true
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-no-mpi)
|
-no-mpi)
|
||||||
withMPI=false
|
withMPI=false
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-python)
|
-python)
|
||||||
withPYTHON=true
|
withPYTHON=true
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-no-python)
|
-no-python)
|
||||||
withPYTHON=false
|
withPYTHON=false
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-python-lib)
|
-python-lib)
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
PYTHON_LIBRARY="$2"
|
PYTHON_LIBRARY="$2"
|
||||||
shift 2
|
shift
|
||||||
;;
|
;;
|
||||||
-cmake)
|
-cmake)
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
CMAKE_PATH=$2
|
CMAKE_PATH=$2
|
||||||
shift 2
|
shift
|
||||||
;;
|
;;
|
||||||
-qmake)
|
-qmake)
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
QMAKE_PATH=$2
|
QMAKE_PATH=$2
|
||||||
shift 2
|
shift
|
||||||
;;
|
;;
|
||||||
-qt)
|
-qt)
|
||||||
withQT=true
|
withQT=true
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-no-qt)
|
-no-qt)
|
||||||
withQT=false
|
withQT=false
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-qt-[1-9]*)
|
-qt-[1-9]*)
|
||||||
QMAKE_PATH="$installBASE/${1##-}"
|
QMAKE_PATH="$installBASE/${1##-}"
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-verbose)
|
-verbose)
|
||||||
withVERBOSE=true
|
withVERBOSE=true
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
-version)
|
-version)
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
setVersion "$2"
|
setParaViewVersion "${2%%/}"
|
||||||
shift 2
|
shift
|
||||||
;;
|
;;
|
||||||
-major)
|
-major)
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
export ParaView_MAJOR="$2"
|
export ParaView_MAJOR="$2"
|
||||||
shift 2
|
shift
|
||||||
;;
|
|
||||||
-buildType)
|
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
|
||||||
buildType="$2"
|
|
||||||
shift 2
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage "unknown option/argument: '$*'"
|
die "unknown option/argument: '$1'"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[ -n "$ParaView_VERSION" ] || die "The paraview-VERSION was not specified"
|
||||||
|
|
||||||
|
# nothing to build
|
||||||
|
if _foamIsNone "$ParaView_VERSION"
|
||||||
|
then
|
||||||
|
echo "Using paraview-none (skip ThirdParty build of ParaView)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$runDEFAULT" = true ]
|
if [ "$runDEFAULT" = true ]
|
||||||
then
|
then
|
||||||
@ -299,8 +304,7 @@ addPythonSupport # set Python-specific options
|
|||||||
addMesaSupport # set MESA-specific options
|
addMesaSupport # set MESA-specific options
|
||||||
addQtSupport # add extra Qt support
|
addQtSupport # add extra Qt support
|
||||||
|
|
||||||
setDirs # where things are or should be put
|
setParaViewDirs # where things are or should be put
|
||||||
echoDateStamp # report kitware source code date-stamp
|
|
||||||
|
|
||||||
|
|
||||||
# Build and install
|
# Build and install
|
||||||
@ -323,7 +327,6 @@ Version information
|
|||||||
qt ${QtVersion:-none}
|
qt ${QtVersion:-none}
|
||||||
version ${ParaView_VERSION:-unknown}
|
version ${ParaView_VERSION:-unknown}
|
||||||
major ${ParaView_MAJOR:-unknown}
|
major ${ParaView_MAJOR:-unknown}
|
||||||
build ${buildType:-Release}
|
|
||||||
$(checkVersion)
|
$(checkVersion)
|
||||||
---------------------
|
---------------------
|
||||||
SUMMARY
|
SUMMARY
|
||||||
@ -334,4 +337,5 @@ SUMMARY
|
|||||||
|
|
||||||
echo
|
echo
|
||||||
echo Done
|
echo Done
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
16
makeQt
16
makeQt
@ -50,7 +50,7 @@ usage() {
|
|||||||
|
|
||||||
usage: ${0##*/} [OPTION] [VERSION]
|
usage: ${0##*/} [OPTION] [VERSION]
|
||||||
options:
|
options:
|
||||||
-gcc force g++ instead of the value from \$WM_CXX
|
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||||
-help
|
-help
|
||||||
|
|
||||||
* build $qtTYPE, version $qtVERSION
|
* build $qtTYPE, version $qtVERSION
|
||||||
@ -58,12 +58,12 @@ options:
|
|||||||
USAGE
|
USAGE
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# ensure configure gets the correct C/C++ compiler
|
||||||
# ensure configure gets the correct C++ compiler
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
|
||||||
|
|
||||||
# parse options
|
# parse options
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
@ -72,18 +72,18 @@ do
|
|||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
-gcc)
|
-gcc)
|
||||||
export CXX=g++ # use g++
|
export CC=gcc # use gcc/g++
|
||||||
shift
|
export CXX=g++
|
||||||
;;
|
;;
|
||||||
[1-9]* | qt-[1-9]*)
|
[1-9]* | qt-[1-9]*)
|
||||||
qtVERSION="${1%%/}";
|
qtVERSION="${1%%/}";
|
||||||
qtVERSION="${qtVERSION#qt-}"
|
qtVERSION="${qtVERSION#qt-}"
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage "unknown option/argument: '$*'"
|
die "unknown option/argument: '$1'"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
323
makeVTK
Executable file
323
makeVTK
Executable file
@ -0,0 +1,323 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM.
|
||||||
|
#
|
||||||
|
# OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
# for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# makeVTK
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Make and install VTK
|
||||||
|
# - place the VTK source under $WM_THIRD_PARTY_DIR/VTK-VERSION
|
||||||
|
#
|
||||||
|
# To use the VTK source from the ParaView source tree, simply make an
|
||||||
|
# appropriate link first. For example,
|
||||||
|
#
|
||||||
|
# ln -s ParaView-5.1.0/VTK VTK-7.1.0
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# run from third-party directory only
|
||||||
|
cd ${0%/*} || exit 1
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
||||||
|
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " The environment variables are inconsistent with the installation."
|
||||||
|
echo " Check the OpenFOAM entries in your dot-files and source them."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
. etc/tools/ThirdPartyFunctions
|
||||||
|
. etc/tools/ParaViewFunctions
|
||||||
|
. etc/tools/vtkFunctions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# USER OPTIONS:
|
||||||
|
# ~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
# MPI support:
|
||||||
|
# use 0 or unset MPI_MAX_PROCS for no upper-limit
|
||||||
|
withMPI=false
|
||||||
|
unset MPI_MAX_PROCS
|
||||||
|
|
||||||
|
# MESA graphics support:
|
||||||
|
withMESA=false
|
||||||
|
MESA_INCLUDE="/usr/include/GL"
|
||||||
|
MESA_LIBRARY="/usr/lib$WM_COMPILER_LIB_ARCH/libOSMesa.so"
|
||||||
|
|
||||||
|
# Set the path to cmake
|
||||||
|
CMAKE_PATH=""
|
||||||
|
|
||||||
|
# New rendering backend (starting with vtk 7?).
|
||||||
|
# Default to auto-config based on VTK version
|
||||||
|
withGL2=auto
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# NO FURTHER EDITING BELOW THIS LINE
|
||||||
|
#
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
Script=${0##*/}
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
exec 1>&2
|
||||||
|
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||||
|
cat<<USAGE
|
||||||
|
|
||||||
|
usage: $Script [OPTION] [vtk-VERSION] [CMAKE-OPTION]
|
||||||
|
options:
|
||||||
|
-rebuild for repeated builds (-make -install) *use with caution*
|
||||||
|
-gl2 with new rendering backend (if not already enabled)
|
||||||
|
-mesa with mesa (if not already enabled)
|
||||||
|
-mpi with mpi (if not already enabled)
|
||||||
|
-mpi=NPROCS with mpi and max 'NPROCS' processes. NPROCS=0 for no
|
||||||
|
upper-limit on processes.
|
||||||
|
-osmesa with off-screen mesa only
|
||||||
|
-cmake PATH with the cmake version corresponding to the cmake path given
|
||||||
|
-gcc force g++ instead of the value from \$WM_CXX
|
||||||
|
-verbose verbose output in Makefiles
|
||||||
|
-version VER specify an alternative version (current value: $VTK_VERSION)
|
||||||
|
-buildType NAME specify the build type (default: Release)
|
||||||
|
-mesa-prefix DIR location of mesa installation
|
||||||
|
-mesa-include DIR location of mesa headers (current value: ${MESA_INCLUDE:-none})
|
||||||
|
-mesa-lib PATH path to mesa library (current value: ${MESA_LIBRARY:-none})
|
||||||
|
-help
|
||||||
|
|
||||||
|
The -no-FEATURE option can be disable these features (if not already disabled):
|
||||||
|
mesa mpi
|
||||||
|
|
||||||
|
CMake options start with a capital letter and contain an '='.
|
||||||
|
For example,
|
||||||
|
$Script BUILD_TESTING=ON
|
||||||
|
to add tests and avoid building documentation
|
||||||
|
|
||||||
|
For finer control, the build stages can be selected or deselected individually:
|
||||||
|
-config -no-config
|
||||||
|
-make -no-make
|
||||||
|
-install -no-install
|
||||||
|
|
||||||
|
|
||||||
|
* Make and install VTK-$VTK_VERSION located under
|
||||||
|
\$WM_THIRD_PARTY_DIR/VTK-$VTK_VERSION
|
||||||
|
-> \$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/VTK-$VTK_VERSION
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# ensure CMake gets the correct C/C++ compiler
|
||||||
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
|
||||||
|
#
|
||||||
|
# various building stages
|
||||||
|
#
|
||||||
|
unset runPATCH runCONFIG runMAKE runINSTALL
|
||||||
|
runDEFAULT=true
|
||||||
|
buildType=Release
|
||||||
|
withOSMESA=false
|
||||||
|
|
||||||
|
# parse options
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
-h | -help)
|
||||||
|
usage
|
||||||
|
;;
|
||||||
|
[0-9]* | vtk-[0-9]* | VTK-[0-9]*) # VTK version
|
||||||
|
setVtkVersion "${1%%/}"
|
||||||
|
;;
|
||||||
|
[A-Z]*=*) # cmake variables
|
||||||
|
addCMakeVariable "$1"
|
||||||
|
;;
|
||||||
|
-gcc)
|
||||||
|
export CC=gcc # use gcc/g++
|
||||||
|
export CXX=g++
|
||||||
|
;;
|
||||||
|
-config) # stage 1: config only
|
||||||
|
runCONFIG=true
|
||||||
|
unset runDEFAULT
|
||||||
|
;;
|
||||||
|
-no-config)
|
||||||
|
runCONFIG=false
|
||||||
|
;;
|
||||||
|
-make) # stage 2: make only
|
||||||
|
runMAKE=true
|
||||||
|
unset runDEFAULT
|
||||||
|
;;
|
||||||
|
-no-make)
|
||||||
|
runMAKE=false
|
||||||
|
;;
|
||||||
|
-install) # stage 3: install only
|
||||||
|
runINSTALL=true
|
||||||
|
unset runDEFAULT
|
||||||
|
;;
|
||||||
|
-no-install)
|
||||||
|
runINSTALL=false
|
||||||
|
;;
|
||||||
|
-rebuild) # shortcut for rebuilding
|
||||||
|
runMAKE=true
|
||||||
|
runINSTALL=true
|
||||||
|
unset runDEFAULT
|
||||||
|
;;
|
||||||
|
-gl2)
|
||||||
|
withGL2=true
|
||||||
|
;;
|
||||||
|
-no-gl2)
|
||||||
|
withGL2=false
|
||||||
|
;;
|
||||||
|
-mesa)
|
||||||
|
withMESA=true
|
||||||
|
;;
|
||||||
|
-osmesa)
|
||||||
|
withMESA=true
|
||||||
|
withOSMESA=true
|
||||||
|
;;
|
||||||
|
-no-mesa)
|
||||||
|
withMESA=false
|
||||||
|
withOSMESA=false
|
||||||
|
;;
|
||||||
|
-mesa-prefix)
|
||||||
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
withMESA=true
|
||||||
|
MESA_INCLUDE="${2%%/}/include"
|
||||||
|
MESA_LIBRARY="${2%%/}/lib$WM_COMPILER_LIB_ARCH/libOSMesa.so"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-mesa-include)
|
||||||
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
MESA_INCLUDE="${2%%/}"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-mesa-lib)
|
||||||
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
MESA_LIBRARY="${2%%/}"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-mpi)
|
||||||
|
withMPI=true
|
||||||
|
;;
|
||||||
|
-mpi=[0-9]*) # mpi and max mpi processes
|
||||||
|
withMPI=true
|
||||||
|
MPI_MAX_PROCS="${1##*=}"
|
||||||
|
;;
|
||||||
|
-no-mpi)
|
||||||
|
withMPI=false
|
||||||
|
;;
|
||||||
|
-cmake)
|
||||||
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
CMAKE_PATH="${2%%/}"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-verbose)
|
||||||
|
withVERBOSE=true
|
||||||
|
;;
|
||||||
|
-version)
|
||||||
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
setVtkVersion "${2%%/}"
|
||||||
|
VTK_VERSION="${2%%/}"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-buildType)
|
||||||
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
buildType="$2"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
die "unknown option/argument: '$1'"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
[ -n "$VTK_VERSION" ] || die "The vtk-VERSION was not specified"
|
||||||
|
|
||||||
|
# Version-specific adjustments
|
||||||
|
if [ "$withGL2" = auto ]
|
||||||
|
then
|
||||||
|
if [ "${VTK_VERSION%%.*}" -lt 7 ]
|
||||||
|
then
|
||||||
|
withGL2=false
|
||||||
|
else
|
||||||
|
withGL2=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$runDEFAULT" = true ]
|
||||||
|
then
|
||||||
|
: ${runPATCH:=true}
|
||||||
|
: ${runCONFIG:=true}
|
||||||
|
: ${runMAKE:=true}
|
||||||
|
: ${runINSTALL:=true}
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Set configure options
|
||||||
|
#~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
addVerbosity # verbose makefiles
|
||||||
|
addMpiSupport # set MPI-specific options
|
||||||
|
addMesaSupport # set MESA-specific options
|
||||||
|
addGL2Support # new rendering backend
|
||||||
|
|
||||||
|
# set off-screen only options
|
||||||
|
if [ "$withOSMESA" = true ]
|
||||||
|
then
|
||||||
|
addCMakeVariable "VTK_USE_X:BOOL=OFF"
|
||||||
|
addCMakeVariable "OPENGL_INCLUDE_DIR=$MESA_INCLUDE"
|
||||||
|
addCMakeVariable "OPENGL_xmesa_INCLUDE_DIR=$MESA_INCLUDE"
|
||||||
|
addCMakeVariable "OPENGL_gl_LIBRARY=$MESA_LIBRARY"
|
||||||
|
addCMakeVariable "OPENGL_glu_LIBRARY=$MESA_LIBRARY"
|
||||||
|
fi
|
||||||
|
|
||||||
|
setVtkDirs # where things are or should be put
|
||||||
|
|
||||||
|
|
||||||
|
# Build and install
|
||||||
|
# ~~~~~~~~~~~~~~~~~
|
||||||
|
cat<<SUMMARY
|
||||||
|
|
||||||
|
Build stages selected
|
||||||
|
---------------------
|
||||||
|
-patch ${runPATCH:-false}
|
||||||
|
-config ${runCONFIG:-false}
|
||||||
|
-make ${runMAKE:-false}
|
||||||
|
-install ${runINSTALL:-false}
|
||||||
|
---------------------
|
||||||
|
Features selected
|
||||||
|
mesa ${withMESA:-false}
|
||||||
|
mpi ${withMPI:-false}
|
||||||
|
---------------------
|
||||||
|
Version information
|
||||||
|
version ${VTK_VERSION:-unknown}
|
||||||
|
build ${buildType:-Release}
|
||||||
|
---------------------
|
||||||
|
SUMMARY
|
||||||
|
|
||||||
|
[ "$runPATCH" = true ] && patchVTK
|
||||||
|
[ "$runCONFIG" = true ] && configVTK
|
||||||
|
[ "$runMAKE" = true ] && makeVTK
|
||||||
|
[ "$runINSTALL" = true ] && installVTK
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo Done
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
14
makeVTK.example
Executable file
14
makeVTK.example
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# An example for building particular combinations of VTK with
|
||||||
|
# - off-screen mesa
|
||||||
|
|
||||||
|
vtk=vtk-7.1.0
|
||||||
|
mesa=mesa-11.2.2
|
||||||
|
|
||||||
|
./makeVTK \
|
||||||
|
$vtk \
|
||||||
|
-osmesa \
|
||||||
|
-mesa-prefix $WM_THIRD_PARTY_DIR/platforms/linux64Gcc/$mesa \
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
Reference in New Issue
Block a user