Merge branch 'develop' into 'master'

Update master prior to v1612 release

See merge request !2
This commit is contained in:
Mark Olesen
2016-12-20 16:53:45 +00:00
35 changed files with 1301 additions and 1933 deletions

View File

@ -67,7 +67,7 @@ fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Clean various packages via 'distclean' # Clean various packages via 'distclean'
for i in openmpi-* ADIOS-* for i in openmpi-* ADIOS-* metis-*
do do
[ -d "$i" ] && ( [ -d "$i" ] && (
echo echo

164
Allwmake
View File

@ -29,7 +29,7 @@
# Build script for ThirdParty # Build script for ThirdParty
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# run from third-party directory only # 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"
@ -44,14 +44,32 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
} }
. etc/tools/ThirdPartyFunctions . etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Export WM settings in a form that GNU configure recognizes
# export WM settings in a form that GNU configure recognizes
[ -n "$WM_CC" ] && export CC="$WM_CC" [ -n "$WM_CC" ] && export CC="$WM_CC"
[ -n "$WM_CXX" ] && export CXX="$WM_CXX" [ -n "$WM_CXX" ] && export CXX="$WM_CXX"
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS" [ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS" [ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS" [ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
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
}
#------------------------------------------------------------------------------
echo echo
echo ======================================== echo ========================================
echo Start ThirdParty Allwmake echo Start ThirdParty Allwmake
@ -89,7 +107,7 @@ OPENMPI)
# end of configuration options # end of configuration options
# ---------------------------- # ----------------------------
mpiPACKAGE="${MPI_ARCH_PATH##*/}" mpiPACKAGE="${MPI_ARCH_PATH##*/}"
sourceDIR=$WM_THIRD_PARTY_DIR/$mpiPACKAGE sourceDIR=$sourceBASE/$mpiPACKAGE
buildDIR=$buildBASE/$mpiPACKAGE buildDIR=$buildBASE/$mpiPACKAGE
cd $sourceDIR || exit 1 cd $sourceDIR || exit 1
@ -132,9 +150,11 @@ MPICH)
( (
# WARNING: unmaintained build code: # WARNING: unmaintained build code:
# --------------------------------- # ---------------------------------
set -x mpiPACKAGE="${MPI_ARCH_PATH##*/}"
cd $MPI_HOME || exit 1 # change to mpich-VERSION sourceDIR=$sourceBASE/$mpiPACKAGE
cd $sourceDIR || exit 1
set -x
[ -e Makefile ] && make distclean 2>/dev/null [ -e Makefile ] && make distclean 2>/dev/null
rm -rf $MPI_ARCH_PATH rm -rf $MPI_ARCH_PATH
rm -rf util/machines/machines.* rm -rf util/machines/machines.*
@ -186,9 +206,9 @@ esac
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# building scotch is still a bit of a pain # 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.sh/scotch) if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/scotch)
then then
. $settings . $settings
@ -203,7 +223,9 @@ 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 SCOTCH_SOURCE_DIR=$sourceBASE/$SCOTCH_VERSION
# This needs generalizing, but works fairly well
scotchMakefile=../../etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM scotchMakefile=../../etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM
if [ -f $SCOTCH_ARCH_PATH/include/scotch.h \ if [ -f $SCOTCH_ARCH_PATH/include/scotch.h \
@ -212,10 +234,12 @@ 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"
elif [ -d "$SCOTCH_VERSION" ] elif [ -d "$SCOTCH_SOURCE_DIR" ]
then then
( (
cd $SCOTCH_VERSION/src || exit 1 cd $SCOTCH_SOURCE_DIR/src || exit 1
rm -rf $SCOTCH_ARCH_PATH
applyPatch $SCOTCH_VERSION .. # patch at parent-level applyPatch $SCOTCH_VERSION .. # patch at parent-level
prefixDIR=$SCOTCH_ARCH_PATH prefixDIR=$SCOTCH_ARCH_PATH
@ -248,15 +272,16 @@ then
# cleanup, could also remove Makefile.inc # cleanup, could also remove Makefile.inc
make realclean 2>/dev/null make realclean 2>/dev/null
) ) || warnBuildIssues SCOTCH
else else
echo " Optional component (SCOTCH) was not found" warnNotFound SCOTCH
fi fi
# build ptscotch if MPI (ThirdParty or system) is available # Build ptscotch if MPI (ThirdParty or system) is available
# and there is a scotch include available (ie, normal scotch was built) # and normal scotch was build (has include and library)
if [ "${FOAM_MPI:-dummy}" != dummy ] && \ if [ "${FOAM_MPI:-dummy}" != dummy ] && \
[ -f $SCOTCH_ARCH_PATH/include/scotch.h ] || \ [ -f $SCOTCH_ARCH_PATH/include/scotch.h \
-a -r $FOAM_EXT_LIBBIN/libscotch.so ] || \
{ {
echo echo
echo " WARNING: skipping pt-scotch - 'scotch.h' include file not found!" echo " WARNING: skipping pt-scotch - 'scotch.h' include file not found!"
@ -276,18 +301,17 @@ then
echo " ptscotch libs in $FOAM_EXT_LIBBIN/$FOAM_MPI" echo " ptscotch libs in $FOAM_EXT_LIBBIN/$FOAM_MPI"
else else
( (
cd $SCOTCH_SOURCE_DIR/src || exit 1
echo echo
set -x
cd $SCOTCH_VERSION/src || exit 1
prefixDIR=$SCOTCH_ARCH_PATH prefixDIR=$SCOTCH_ARCH_PATH
libDIR=$FOAM_EXT_LIBBIN/$FOAM_MPI
incDIR=$SCOTCH_ARCH_PATH/include/$FOAM_MPI incDIR=$SCOTCH_ARCH_PATH/include/$FOAM_MPI
libDIR=$FOAM_EXT_LIBBIN/$FOAM_MPI
mkdir -p $prefixDIR 2>/dev/null mkdir -p $prefixDIR 2>/dev/null
mkdir -p $libDIR 2>/dev/null mkdir -p $libDIR 2>/dev/null
configOpt="prefix=$prefixDIR libdir=$libDIR includedir=$incDIR" configOpt="prefix=$prefixDIR includedir=$incDIR libdir=$libDIR"
if [ -f $scotchMakefile ] if [ -f $scotchMakefile ]
then then
@ -314,7 +338,7 @@ then
) )
fi fi
# verify existence of scotch include # verify existence of ptscotch include
[ -f $SCOTCH_ARCH_PATH/include/$FOAM_MPI/ptscotch.h ] || { [ -f $SCOTCH_ARCH_PATH/include/$FOAM_MPI/ptscotch.h ] || {
echo echo
echo " WARNING: required include file 'ptscotch.h' not found!" echo " WARNING: required include file 'ptscotch.h' not found!"
@ -334,87 +358,61 @@ if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/metis)
then then
. $settings . $settings
fi fi
if [ -d "$METIS_VERSION" ]
METIS_SOURCE_DIR=$sourceBASE/$METIS_VERSION
if [ -f $METIS_ARCH_PATH/include/metis.h \
-a -r $FOAM_EXT_LIBBIN/libmetis.so ]
then then
echo " metis header in $METIS_ARCH_PATH/include"
echo " metis libs in $FOAM_EXT_LIBBIN"
echo
elif [ -d "$METIS_SOURCE_DIR" ]
then
(
cd $METIS_SOURCE_DIR || exit 1
rm -rf $METIS_ARCH_PATH
if [ -f $METIS_ARCH_PATH/include/metis.h \ # Adjust metis integer size to match OpenFOAM label-size
-a -r $FOAM_EXT_LIBBIN/libmetis.so ] sed -i -e 's=\(#define IDXTYPEWIDTH\).*=\1 '$WM_LABEL_SIZE'=' \
then include/metis.h
echo " metis header in $METIS_ARCH_PATH/include"
echo " metis libs in $FOAM_EXT_LIBBIN"
echo
else
(
set -x
cd $METIS_VERSION || exit 1
if [ "$WM_PRECISION_OPTION" = "DP" ] # No config option for the library location.
then # - build normally and use mv to relocate it
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 make config shared=1 prefix=$METIS_ARCH_PATH \
sed -i -e 's=\(#define IDXTYPEWIDTH\).*=\1 '$WM_LABEL_SIZE'=' \ && make -j $WM_NCOMPPROCS install \
-e 's=\(#define REALTYPEWIDTH\).*=\1 '$FLOAT_PRECISION'=' \ && mv $METIS_ARCH_PATH/lib/libmetis.so $FOAM_EXT_LIBBIN
include/metis.h
make config shared=1 prefix=$METIS_ARCH_PATH rmdir $METIS_ARCH_PATH/lib 2>/dev/null || true # failure is not critical
make -j $WM_NCOMPPROCS install ) || warnBuildIssues METIS
cp $METIS_ARCH_PATH/lib/libmetis.so $FOAM_EXT_LIBBIN
)
fi
else else
echo " Optional component (METIS) was not found" warnNotFound METIS
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 ========================================
echo Build CGAL echo Build CGAL
if [ -d "$CGAL_ARCH_PATH/include" \ if [ -d "$CGAL_ARCH_PATH/include" \
-a -r "$CGAL_ARCH_PATH/lib/libCGAL.so" ] -a -r "$CGAL_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libCGAL.so" ]
then then
# first some information about boost # first some information about boost
if [ -d "$BOOST_ARCH_PATH/include/boost" \ for root in "$BOOST_ARCH_PATH" /usr
-a -r "$BOOST_ARCH_PATH/lib/libboost_system.so" ] do
then if [ -d "$root/include/boost" \
echo " BOOST headers in $BOOST_ARCH_PATH/include" -a -r "$root/lib$WM_COMPILER_LIB_ARCH/libboost_system.so" ]
echo " BOOST libs in $BOOST_ARCH_PATH/lib" then
elif [ -d "/usr/include/boost" \ echo " BOOST headers in $root/include"
-a -r "/usr/lib${WM_COMPILER_LIB_ARCH}/libboost_system.so" ] echo " BOOST libs in $root/lib$WM_COMPILER_LIB_ARCH"
then break
echo " BOOST headers in /usr/include" fi
echo " BOOST libs in /usr/lib${WM_COMPILER_LIB_ARCH}" done
fi
echo " CGAL headers in $CGAL_ARCH_PATH/include" echo " CGAL headers in $CGAL_ARCH_PATH/include"
echo " CGAL libs in $CGAL_ARCH_PATH/lib" echo " CGAL libs in $CGAL_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
elif [ -n "$CGAL_ARCH_PATH" ] elif [ -n "$CGAL_ARCH_PATH" ]
then then
./makeCGAL || warnBuildIssues CGAL ./makeCGAL || warnBuildIssues CGAL

131
BUILD.md
View File

@ -18,24 +18,33 @@ OpenFOAM depends to a certain extent on third-party libraries
scripts for building third-party packages. It should normally only be used in scripts for building third-party packages. It should normally only be used in
conjunction with the corresponding OpenFOAM version. conjunction with the corresponding OpenFOAM version.
## Organization
The ThirdParty directory contains a number of build scripts as well as
some directories:
| Directory | Contains
|-------------------|--------------------------------------------
| etc/ | auxiliary scripts used for the build process
| build/ | intermediate build objects
| platforms/ | the installation directories
## Configuration of Third-Party Versions ## Configuration of Third-Party Versions
The distributed make scripts can generally be used for a variety of For most of the build scripts, the default software version
versions of the third-party libraries, with the software version is provided by an appropriate OpenFOAM `etc/config.sh/...` entry.
specified on the command-line. For example,
$ ./makeFFTW -help
usage: makeFFTW [OPTION] [fftw-VERSION]
If a version is not explicitly specified on the command-line, it will
use the version as specified by the appropriate OpenFOAM
`etc/config.sh/...` entry.
This approach avoids duplicate entries for the default versions and This approach avoids duplicate entries for the default versions and
ensures the best overall consistency between the OpenFOAM installation ensures the best overall consistency between the OpenFOAM installation
and its corresponding third-party installation. and its corresponding third-party installation.
Nonethess, the distributed make scripts can generally be used for a
variety of versions of the third-party libraries, with the software
version specified on the command-line. For example,
$ ./makeFFTW -help
usage: makeFFTW [OPTION] [fftw-VERSION]
--- ---
## Before Starting ## Before Starting
@ -169,13 +178,13 @@ and save some disk space.
sources that are bundled with ParaView. sources that are bundled with ParaView.
For example, by using a symbolic link: For example, by using a symbolic link:
ln -s ParaView-5.2.0/VTK VTK-7.1.0 ln -s ParaView-5.0.1/VTK VTK-7.1.0
The appropriate VTK version number can be found from the contents of The appropriate VTK version number can be found from the contents of
the `vtkVersion.cmake` file. the `vtkVersion.cmake` file.
For example, For example,
$ cat ParaView-5.2.0/VTK/CMake/vtkVersion.cmake $ cat ParaView-5.0.1/VTK/CMake/vtkVersion.cmake
# VTK version number components. # VTK version number components.
set(VTK_MAJOR_VERSION 7) set(VTK_MAJOR_VERSION 7)
@ -183,19 +192,21 @@ and save some disk space.
set(VTK_BUILD_VERSION 0) set(VTK_BUILD_VERSION 0)
### ParaView ### ParaView
- **ParaView-5.0.1** is the last version for which the OpenFOAM reader
modules (eg, to visualize a `blockMeshDict`) work in their present form.
- Building ParaView requires CMake, qmake and a `qt` development files. - Building ParaView requires CMake, qmake and a `qt` development files.
Use the `-cmake`, `-qmake` and `-qt-*` options for `makeParaView` as Use the `-cmake`, `-qmake` and `-qt-*` options for `makeParaView` as
required. required.
See additional notes below about [making Qt](#makeQt) if necessary. See additional notes below about [making Qt](#makeQt) if necessary.
### ParaView
- Both CMake and qmake are required when building ParaView.
#### 5.2.0 #### 5.2.0
- Compiles without patching. - Compiles without patching, but the OpenFOAM reader modules
(eg, to visualize a `blockMeshDict`) have not yet been migrated
to this version.
#### 4.4.0/5.0.0/5.0.1/5.1.2 #### 4.4.0/5.0.0/5.0.1/5.1.2
- If using `makeParaView`, the following patches will be automatically - When using `makeParaView`, the following patches will be automatically
applied (see the `etc/patches` directory): applied (see the `etc/patches` directory):
- Bugfix for STL reader - affects 4.4.0 only. - Bugfix for STL reader - affects 4.4.0 only.
- Broken installation (ui_pqExportStateWizard.h) - affects 4.4.0/5.0.0/5.0.1/5.1.x - Broken installation (ui_pqExportStateWizard.h) - affects 4.4.0/5.0.0/5.0.1/5.1.x
@ -204,7 +215,6 @@ and save some disk space.
the compilation of ParaView to halt. The easiest solution is to delete the compilation of ParaView to halt. The easiest solution is to delete
the ParaView-5.0.1/Plugins/SciberQuestToolKit directory. the ParaView-5.0.1/Plugins/SciberQuestToolKit directory.
### Making Qt <a name="makeQt"></a> ### Making Qt <a name="makeQt"></a>
- Building a third-party Qt installation (prior to building ParaView) requires - Building a third-party Qt installation (prior to building ParaView) requires
some additional effort, but should nonetheless work smoothly. some additional effort, but should nonetheless work smoothly.
@ -217,7 +227,7 @@ and save some disk space.
3. Build ParaView using this third-party QT. For example, 3. Build ParaView using this third-party QT. For example,
./makeParaView -qt-4.8.7 5.2.0 ./makeParaView -qt-4.8.7 5.0.1
- ParaView does not yet support QT5. - ParaView does not yet support QT5.
@ -226,7 +236,6 @@ and save some disk space.
central location), you will need to use the `etc/relocateQt` script central location), you will need to use the `etc/relocateQt` script
afterwards. afterwards.
--- ---
## Versions ## Versions
@ -235,12 +244,12 @@ and save some disk space.
The minimum version of gcc required is 4.8.0. The minimum version of gcc required is 4.8.0.
| Name | Location | | Name | Location
|-------------------|--------------------------------------------| |-------------------|--------------------------------------------
| [gcc][page gcc] | [releases][link gcc] | | [gcc][page gcc] | [releases][link gcc]
| [gmp][page gmp] | system is often ok, otherwise [download][link gmp] | | [gmp][page gmp] | system is often ok, otherwise [download][link gmp]
| [mpfr][page mpfr] | system is often ok, otherwise [download][link mpfr] | | [mpfr][page mpfr] | system is often ok, otherwise [download][link mpfr]
| [mpc][page mpc] | system is often ok, otherwise [download][link mpc] | | [mpc][page mpc] | system is often ok, otherwise [download][link mpc]
#### Potential MPFR conflicts #### Potential MPFR conflicts
@ -274,41 +283,41 @@ update your CMake beforehand.
GNU *configure* can only be used prior to clang version 3.9. GNU *configure* can only be used prior to clang version 3.9.
| Name | Location | | Name | Location
|-----------------------|------------------------| |-----------------------|------------------------
| [clang][page clang] | [download][link clang] | | [clang][page clang] | [download][link clang]
| [llvm][page llvm] | [download][link llvm] | | [llvm][page llvm] | [download][link llvm]
### Parallel Processing <a name="parallel"></a> ### Parallel Processing <a name="parallel"></a>
| Name | Location | | Name | Location
|-----------------------|------------------------| |-----------------------|------------------------
| [adios][page adios] | [repo][repo adios] or [github download][link adios] or [alt download][altlink adios] | | [adios][page adios] | [repo][repo adios] or [github download][link adios] or [alt download][altlink adios]
| [scotch, ptscotch][page scotch] | [download][link scotch] | | [scotch, ptscotch][page scotch] | [download][link scotch]
| [openmpi][page openmpi] | [download][link openmpi] | | [openmpi][page openmpi] | [download][link openmpi]
### General <a name="general-packages"></a> ### General <a name="general-packages"></a>
| Name | Location | | Name | Location
|-----------------------|------------------------| |-----------------------|------------------------
| [CMake][page cmake] | [download][link cmake] | | [CMake][page cmake] | [download][link cmake]
| [boost][page boost] | [download][link boost] | | [boost][page boost] | [download][link boost]
| [CGAL][page CGAL] | [download][link CGAL] or [newer][newer CGAL] | | [CGAL][page CGAL] | [download][link CGAL] or [older][older CGAL]
| [FFTW][page FFTW] | [download][link FFTW] | | [FFTW][page FFTW] | [download][link FFTW]
| [ADF/CGNS][page CGNS], ccm | [link ccmio][link ccmio] | | [ADF/CGNS][page CGNS], ccm | [link ccmio][link ccmio]
| [tecio][page tecio] | [link tecio][link tecio] | | [tecio][page tecio] | [link tecio][link tecio]
| gperftools | [repo][repo gperftools] or [download][link gperftools] | | gperftools | [repo][repo gperftools] or [download][link gperftools]
### Visualization <a name="viz-version"></a> ### Visualization <a name="viz-version"></a>
| Name | Location | | Name | Location
|-----------------------|------------------------| |-----------------------|------------------------
| [MESA][page mesa] | [download][link mesa] or [older][older mesa] | | [MESA][page mesa] | [download][link mesa] or [older][older mesa]
| [ParaView][page ParaView] | [download][link ParaView] or older [5.1][older ParaView-51], [5.0][older ParaView-50], [4.4][older ParaView-44] | | [ParaView][page ParaView] | [download][link ParaView]. The reader modules do not yet work with the newest paraview versions.
| [Qt][page Qt] | [repo][repo Qt] or [download][link Qt]. The newer [Qt5][newer Qt5] is **not** currently supported by ParaView. | | [Qt][page Qt] | [repo][repo Qt] or [download][link Qt]. The newer [Qt5][newer Qt5] is **not** currently supported by ParaView.
### CMake Minimum Requirements <a name="min-cmake"></a> ### CMake Minimum Requirements <a name="min-cmake"></a>
@ -316,7 +325,9 @@ GNU *configure* can only be used prior to clang version 3.9.
The minimum CMake requirements for building various components. The minimum CMake requirements for building various components.
2.8 llvm-3.4.2 2.8 llvm-3.4.2
2.8.8 ParaView-5.0.1
2.8.11 CGAL-4.9 2.8.11 CGAL-4.9
2.8.12.2 llvm-3.7.0
2.8.12.2 llvm-3.8.0 2.8.12.2 llvm-3.8.0
2.8.4 cmake-3.6.0 2.8.4 cmake-3.6.0
3.3 ParaView-5.1.2 3.3 ParaView-5.1.2
@ -341,8 +352,11 @@ The minimum CMake requirements for building various components.
[page clang]: http://llvm.org/ [page clang]: http://llvm.org/
[page llvm]: http://llvm.org/ [page llvm]: http://llvm.org/
[link clang]: http://llvm.org/releases/3.9.0/cfe-3.9.0.src.tar.xz [link clang]: http://llvm.org/releases/3.7.0/cfe-3.7.0.src.tar.xz
[link llvm]: http://llvm.org/releases/3.9.0/llvm-3.9.0.src.tar.xz [link llvm]: http://llvm.org/releases/3.7.0/llvm-3.7.0.src.tar.xz
[newer clang]: http://llvm.org/releases/3.9.0/cfe-3.9.0.src.tar.xz
[newer llvm]: http://llvm.org/releases/3.9.0/llvm-3.9.0.src.tar.xz
<!-- parallel --> <!-- parallel -->
@ -368,8 +382,8 @@ The minimum CMake requirements for building various components.
[link boost]: https://sourceforge.net/projects/boost/files/boost/1.62.0/boost_1_62_0.tar.bz2 [link boost]: https://sourceforge.net/projects/boost/files/boost/1.62.0/boost_1_62_0.tar.bz2
[page CGAL]: http://cgal.org [page CGAL]: http://cgal.org
[link CGAL]: https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.8.2/CGAL-4.8.2.tar.xz [link CGAL]: https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.9/CGAL-4.9.tar.xz
[newer CGAL]: https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.9/CGAL-4.9.tar.xz [older CGAL]: https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.8.2/CGAL-4.8.2.tar.xz
[page FFTW]: http://www.fftw.org/ [page FFTW]: http://www.fftw.org/
[link FFTW]: http://www.fftw.org/fftw-3.3.5.tar.gz [link FFTW]: http://www.fftw.org/fftw-3.3.5.tar.gz
@ -387,11 +401,11 @@ The minimum CMake requirements for building various components.
<!-- Visualization --> <!-- Visualization -->
[page ParaView]: http://www.paraview.org/ [page ParaView]: http://www.paraview.org/
[link ParaView]: http://www.paraview.org/files/v5.2/ParaView-v5.2.0.tar.gz [link ParaView]: http://www.paraview.org/files/v5.0/ParaView-v5.0.1-source.tar.gz
[older ParaView-44]: http://www.paraview.org/files/v4.4/ParaView-v4.4.0-source.tar.gz [older ParaView-44]: http://www.paraview.org/files/v4.4/ParaView-v4.4.0-source.tar.gz
[older ParaView-50]: http://www.paraview.org/files/v5.0/ParaView-v5.0.1-source.tar.gz [newer ParaView-51]: http://www.paraview.org/files/v5.1/ParaView-v5.1.2-source.tar.gz
[older ParaView-51]: http://www.paraview.org/files/v5.1/ParaView-v5.1.2-source.tar.gz [newer ParaView-52]: http://www.paraview.org/files/v5.2/ParaView-v5.2.0.tar.gz
[page mesa]: http://mesa3d.org/ [page mesa]: http://mesa3d.org/
[link mesa]: ftp://ftp.freedesktop.org/pub/mesa/13.0.1/mesa-13.0.1.tar.xz [link mesa]: ftp://ftp.freedesktop.org/pub/mesa/13.0.1/mesa-13.0.1.tar.xz
@ -406,7 +420,8 @@ The minimum CMake requirements for building various components.
<!-- Standard Footer --> <!-- Standard Footer -->
## Additional OpenFOAM Links ## Additional OpenFOAM Links
- [Download and installation instructions](http://www.openfoam.com/releases) - [Download](http://www.openfoam.com/releases) and
[installation instructions](http://www.openfoam.com/download/installation.php)
- [Documentation](http://www.openfoam.com/documentation) - [Documentation](http://www.openfoam.com/documentation)
- [Reporting bugs/issues (including bugs/suggestions/feature requests) in OpenFOAM+](http://www.openfoam.com/code/bug-reporting.php) - [Reporting bugs/issues (including bugs/suggestions/feature requests) in OpenFOAM+](http://www.openfoam.com/code/bug-reporting.php)
- [Collaborative and Community-based Developments](http://www.openfoam.com/services/community-projects.php) - [Collaborative and Community-based Developments](http://www.openfoam.com/services/community-projects.php)

View File

@ -18,24 +18,18 @@ OpenFOAM depends to a certain extent on third-party libraries
scripts for building third-party packages. It should normally only be used in scripts for building third-party packages. It should normally only be used in
conjunction with the corresponding OpenFOAM version. conjunction with the corresponding OpenFOAM version.
## Configuration of Third-Party Versions ## Configuration of Third-Party Versions
The distributed make scripts can generally be used for a variety of For most of the build scripts, the default software version
versions of the third-party libraries, with the software version is provided by an appropriate OpenFOAM `etc/config.sh/...` entry.
specified on the command-line. For example,
$ ./makeFFTW -help
usage: makeFFTW [OPTION] [fftw-VERSION]
If a version is not explicitly specified on the command-line, it will
use the version as specified by the appropriate OpenFOAM
`etc/config.sh/...` entry.
This approach avoids duplicate entries for the default versions and This approach avoids duplicate entries for the default versions and
ensures the best overall consistency between the OpenFOAM installation ensures the best overall consistency between the OpenFOAM installation
and its corresponding third-party installation. and its corresponding third-party installation.
Nonethess, the distributed make scripts can generally be used for a
variety of versions of the third-party libraries, with the software
version specified on the command-line.
--- ---
## Before Starting ## Before Starting
@ -56,10 +50,10 @@ and its corresponding third-party installation.
Many components of ThirdParty are *optional* or are invoked Many components of ThirdParty are *optional* or are invoked
automatically as part of the top-level OpenFOAM `Allwmake`. automatically as part of the top-level OpenFOAM `Allwmake`.
Nonetheless it may be necessary or useful to build various Nonetheless it may be necessary or useful to build particular
ThirdParty components prior to building OpenFOAM itself. ThirdParty components prior to building OpenFOAM itself.
## Build Sequence ### Build Sequence
1. `makeGcc` _or_ `makeLLVM` *(optional)* 1. `makeGcc` _or_ `makeLLVM` *(optional)*
2. `makeCmake` *(optional)* 2. `makeCmake` *(optional)*
@ -77,7 +71,8 @@ More details can be found the ThirdParty ./BUILD.md information.
<!-- Standard Footer --> <!-- Standard Footer -->
## Additional OpenFOAM Links ## Additional OpenFOAM Links
- [Download and installation instructions](http://www.openfoam.com/releases) - [Download](http://www.openfoam.com/releases) and
[installation instructions](http://www.openfoam.com/download/installation.php)
- [Documentation](http://www.openfoam.com/documentation) - [Documentation](http://www.openfoam.com/documentation)
- [Reporting bugs/issues (including bugs/suggestions/feature requests) in OpenFOAM+](http://www.openfoam.com/code/bug-reporting.php) - [Reporting bugs/issues (including bugs/suggestions/feature requests) in OpenFOAM+](http://www.openfoam.com/code/bug-reporting.php)
- [Collaborative and Community-based Developments](http://www.openfoam.com/services/community-projects.php) - [Collaborative and Community-based Developments](http://www.openfoam.com/services/community-projects.php)

View File

@ -1,543 +0,0 @@
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.

12
etc/patches/ADIOS-1.11.0 Normal file
View File

@ -0,0 +1,12 @@
--- ADIOS-1.11.0/src/core/adios_transform_methods.c.orig 2016-11-17 19:46:11.000000000 +0100
+++ ADIOS-1.11.0/src/core/adios_transform_methods.c 2016-12-14 15:19:39.870832445 +0100
@@ -7,6 +7,9 @@
ADIOS_AVAILABLE_TRANSFORM_METHODS * adios_available_transform_methods()
{
+ /* Ensure the transforms are initialized before accessing */
+ adios_transform_read_init();
+
int i, n;
n = 0;
for (i = (int)adios_transform_none; i < num_adios_transform_types; i++) {

1
etc/patches/adios-1.11.0 Symbolic link
View File

@ -0,0 +1 @@
ADIOS-1.11.0

View File

@ -2,12 +2,26 @@
# simple script to generate patches # simple script to generate patches
paraview=ParaView-5.0.1 paraview=ParaView-5.0.1
if [ "$#" -gt 0 ]
then
paraview="${1%%/}"
fi
[ -d "$paraview" ] || {
echo "No directory '$paraview'" 1>&2
exit 2
}
for i in \ for i in \
$paraview/VTK/CMake/vtkCompilerExtras.cmake \ $paraview/VTK/CMake/vtkCompilerExtras.cmake \
$paraview/VTK/CMake/GenerateExportHeader.cmake \ $paraview/VTK/CMake/GenerateExportHeader.cmake \
$paraview/Qt/Components/CMakeLists.txt \ $paraview/Qt/Components/CMakeLists.txt \
$paraview/CMake/generate_qhp.cmake \
$paraview/CMake/ParaViewMacros.cmake \
$paraview/CMake/generate_proxydocumentation.cmake \
; ;
do do
diff -uw $i.orig $i diff -uw $i.orig $i
done done
# -----------------------------------------------------------------------------

View File

@ -16,7 +16,7 @@
ERROR_VARIABLE _gcc_version_info) ERROR_VARIABLE _gcc_version_info)
- string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]*" - string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]*"
+ string (REGEX MATCH "[3-6]\\.[0-9]\\.[0-9]*" + string (REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*"
_gcc_version "${_gcc_version_info}") _gcc_version "${_gcc_version_info}")
if(NOT _gcc_version) if(NOT _gcc_version)
string (REGEX REPLACE ".*\\(GCC\\).*([34]\\.[0-9]).*" "\\1.0" string (REGEX REPLACE ".*\\(GCC\\).*([34]\\.[0-9]).*" "\\1.0"
@ -27,24 +27,18 @@
OUTPUT_VARIABLE _gcc_version_info OUTPUT_VARIABLE _gcc_version_info
ERROR_VARIABLE _gcc_version_info) ERROR_VARIABLE _gcc_version_info)
- string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]*" - string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]*"
+ string(REGEX MATCH "[3-6]\\.[0-9]\\.[0-9]*" + string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*"
_gcc_version "${_gcc_version_info}") _gcc_version "${_gcc_version_info}")
# gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
# patch level, handle this here: # 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.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 +++ ParaView-5.0.1/Qt/Components/CMakeLists.txt 2016-06-13 09:29:28.599318445 +0200
@@ -656,10 +656,10 @@ @@ -640,7 +640,7 @@
#the pqSGExportStateWizard has subclasses that directly access #the pqSGExportStateWizard has subclasses that directly access
#the UI file, and currently we don't have a clean way to break this hard #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. #dependency, so for no we install this ui file.
-if(PARAVIEW_INSTALL_DEVELOPMENT_FILES) -if(PARAVIEW_INSTALL_DEVELOPMENT_FILES)
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h" +if(PARAVIEW_INSTALL_DEVELOPMENT_FILES AND PARAVIEW_ENABLE_PYTHON)
- DESTINATION "${VTK_INSTALL_INCLUDE_DIR}") install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h"
-endif() DESTINATION "${VTK_INSTALL_INCLUDE_DIR}")
+#OPENFOAM patch#if(PARAVIEW_INSTALL_DEVELOPMENT_FILES) endif()
+#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

1
etc/patches/paraview-5.0.0 Symbolic link
View File

@ -0,0 +1 @@
paraview-5.0.1

View File

@ -1,39 +1,87 @@
--- 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.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 +++ ParaView-5.0.1/VTK/CMake/vtkCompilerExtras.cmake 2016-12-13 17:21:25.382720945 +0100
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
OUTPUT_VARIABLE _gcc_version_info OUTPUT_VARIABLE _gcc_version_info
ERROR_VARIABLE _gcc_version_info) ERROR_VARIABLE _gcc_version_info)
- string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]*" - string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]*"
+ string (REGEX MATCH "[3-6]\\.[0-9]\\.[0-9]*" + string (REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*"
_gcc_version "${_gcc_version_info}") _gcc_version "${_gcc_version_info}")
if(NOT _gcc_version) if(NOT _gcc_version)
string (REGEX REPLACE ".*\\(GCC\\).*([34]\\.[0-9]).*" "\\1.0" 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.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 +++ ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake 2016-12-13 17:21:25.382720945 +0100
@@ -166,7 +166,7 @@ @@ -166,7 +166,7 @@
execute_process(COMMAND ${CMAKE_C_COMPILER} ARGS --version execute_process(COMMAND ${CMAKE_C_COMPILER} ARGS --version
OUTPUT_VARIABLE _gcc_version_info OUTPUT_VARIABLE _gcc_version_info
ERROR_VARIABLE _gcc_version_info) ERROR_VARIABLE _gcc_version_info)
- string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]*" - string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]*"
+ string(REGEX MATCH "[3-6]\\.[0-9]\\.[0-9]*" + string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*"
_gcc_version "${_gcc_version_info}") _gcc_version "${_gcc_version_info}")
# gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
# patch level, handle this here: # 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.orig 2016-03-28 17:07:03.000000000 +0200
+++ ParaView-5.0.1/Qt/Components/CMakeLists.txt 2016-06-13 09:29:28.599318445 +0200 +++ ParaView-5.0.1/Qt/Components/CMakeLists.txt 2016-12-13 17:38:42.713553032 +0100
@@ -656,10 +656,10 @@ @@ -656,7 +656,7 @@
#the pqSGExportStateWizard has subclasses that directly access #the pqSGExportStateWizard has subclasses that directly access
#the UI file, and currently we don't have a clean way to break this hard #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. #dependency, so for no we install this ui file.
-if(PARAVIEW_INSTALL_DEVELOPMENT_FILES) -if(PARAVIEW_INSTALL_DEVELOPMENT_FILES)
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h" +if(PARAVIEW_INSTALL_DEVELOPMENT_FILES AND PARAVIEW_ENABLE_PYTHON)
- DESTINATION "${VTK_INSTALL_INCLUDE_DIR}") install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h"
-endif() DESTINATION "${VTK_INSTALL_INCLUDE_DIR}")
+#OPENFOAM patch#if(PARAVIEW_INSTALL_DEVELOPMENT_FILES) endif()
+#OPENFOAM patch# install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h" --- ParaView-5.0.1/CMake/generate_qhp.cmake.orig 2016-03-28 17:06:22.000000000 +0200
+#OPENFOAM patch# DESTINATION "${VTK_INSTALL_INCLUDE_DIR}") +++ ParaView-5.0.1/CMake/generate_qhp.cmake 2016-12-13 17:21:25.382720945 +0100
+#OPENFOAM patch#endif() @@ -44,7 +48,9 @@
message(FATAL_ERROR "Missing one of the required arguments!!")
endif ()
-string (REPLACE "+" ";" file_patterns "${file_patterns}")
+# Recover original ';' separated list.
+string(REPLACE "_s" ";" file_patterns "${file_patterns}")
+string(REPLACE "_u" "_" file_patterns "${file_patterns}")
get_filename_component(working_dir "${output_file}" PATH)
--- ParaView-5.0.1/CMake/ParaViewMacros.cmake.orig 2016-03-28 17:07:03.000000000 +0200
+++ ParaView-5.0.1/CMake/ParaViewMacros.cmake 2016-12-13 17:21:25.382720945 +0100
@@ -219,15 +226,21 @@
set (xmls_string "")
foreach (xml ${xmls})
get_filename_component(xml "${xml}" ABSOLUTE)
- set (xmls_string "${xmls_string}${xml}+")
+ set (xmls_string "${xmls_string}${xml};")
endforeach()
set (gui_xmls_string "")
foreach (gui_xml ${gui_xmls})
get_filename_component(gui_xml "${gui_xml}" ABSOLUTE)
- set (gui_xmls_string "${gui_xmls_string}${gui_xml}+")
+ set (gui_xmls_string "${gui_xmls_string}${gui_xml};")
endforeach()
+ # Escape ';' in lists
+ string(REPLACE "_" "_u" xmls_string "${xmls_string}")
+ string(REPLACE ";" "_s" xmls_string "${xmls_string}")
+ string(REPLACE "_" "_u" gui_xmls_string "${gui_xmls_string}")
+ string(REPLACE ";" "_s" gui_xmls_string "${gui_xmls_string}")
+
set (all_xmls ${xmls} ${gui_xmls})
list (GET all_xmls 0 first_xml)
if (NOT first_xml)
--- ParaView-5.0.1/CMake/generate_proxydocumentation.cmake.orig 2016-03-28 17:06:22.000000000 +0200
+++ ParaView-5.0.1/CMake/generate_proxydocumentation.cmake 2016-12-13 17:21:25.382720945 +0100
@@ -21,8 +21,10 @@
endif()
# input_xmls is a pseudo-list. Convert it to a real CMake list.
-string(REPLACE "+" ";" input_xmls "${input_xmls}")
-string(REPLACE "+" ";" input_gui_xmls "${input_gui_xmls}")
+string(REPLACE "_s" ";" input_xmls "${input_xmls}")
+string(REPLACE "_u" "_" input_xmls "${input_xmls}")
+string(REPLACE "_s" ";" input_gui_xmls "${input_gui_xmls}")
+string(REPLACE "_u" "_" input_gui_xmls "${input_gui_xmls}")
set (xslt_xml)
#IF (NOT PV_INSTALL_NO_DEVELOPMENT)
# # Headers

View File

@ -1,17 +0,0 @@
--- 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

1
etc/patches/paraview-5.1.0 Symbolic link
View File

@ -0,0 +1 @@
paraview-5.1.2

View File

@ -0,0 +1,65 @@
--- ParaView-5.1.2/Qt/Components/CMakeLists.txt.orig 2016-07-26 21:52:16.000000000 +0200
+++ ParaView-5.1.2/Qt/Components/CMakeLists.txt 2016-12-13 17:38:42.713553032 +0100
@@ -591,7 +591,7 @@
#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)
+if(PARAVIEW_INSTALL_DEVELOPMENT_FILES AND PARAVIEW_ENABLE_PYTHON)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h"
DESTINATION "${VTK_INSTALL_INCLUDE_DIR}")
endif()
--- ParaView-5.1.2/CMake/generate_qhp.cmake.orig 2016-03-28 17:06:22.000000000 +0200
+++ ParaView-5.1.2/CMake/generate_qhp.cmake 2016-12-13 17:21:25.382720945 +0100
@@ -44,7 +48,9 @@
message(FATAL_ERROR "Missing one of the required arguments!!")
endif ()
-string (REPLACE "+" ";" file_patterns "${file_patterns}")
+# Recover original ';' separated list.
+string(REPLACE "_s" ";" file_patterns "${file_patterns}")
+string(REPLACE "_u" "_" file_patterns "${file_patterns}")
get_filename_component(working_dir "${output_file}" PATH)
--- ParaView-5.1.2/CMake/ParaViewMacros.cmake.orig 2016-03-28 17:07:03.000000000 +0200
+++ ParaView-5.1.2/CMake/ParaViewMacros.cmake 2016-12-13 17:21:25.382720945 +0100
@@ -219,15 +226,21 @@
set (xmls_string "")
foreach (xml ${xmls})
get_filename_component(xml "${xml}" ABSOLUTE)
- set (xmls_string "${xmls_string}${xml}+")
+ set (xmls_string "${xmls_string}${xml};")
endforeach()
set (gui_xmls_string "")
foreach (gui_xml ${gui_xmls})
get_filename_component(gui_xml "${gui_xml}" ABSOLUTE)
- set (gui_xmls_string "${gui_xmls_string}${gui_xml}+")
+ set (gui_xmls_string "${gui_xmls_string}${gui_xml};")
endforeach()
+ # Escape ';' in lists
+ string(REPLACE "_" "_u" xmls_string "${xmls_string}")
+ string(REPLACE ";" "_s" xmls_string "${xmls_string}")
+ string(REPLACE "_" "_u" gui_xmls_string "${gui_xmls_string}")
+ string(REPLACE ";" "_s" gui_xmls_string "${gui_xmls_string}")
+
set (all_xmls ${xmls} ${gui_xmls})
list (GET all_xmls 0 first_xml)
if (NOT first_xml)
--- ParaView-5.1.2/CMake/generate_proxydocumentation.cmake.orig 2016-03-28 17:06:22.000000000 +0200
+++ ParaView-5.1.2/CMake/generate_proxydocumentation.cmake 2016-12-13 17:21:25.382720945 +0100
@@ -21,8 +21,10 @@
endif()
# input_xmls is a pseudo-list. Convert it to a real CMake list.
-string(REPLACE "+" ";" input_xmls "${input_xmls}")
-string(REPLACE "+" ";" input_gui_xmls "${input_gui_xmls}")
+string(REPLACE "_s" ";" input_xmls "${input_xmls}")
+string(REPLACE "_u" "_" input_xmls "${input_xmls}")
+string(REPLACE "_s" ";" input_gui_xmls "${input_gui_xmls}")
+string(REPLACE "_u" "_" input_gui_xmls "${input_gui_xmls}")
set (xslt_xml)

View File

@ -1,426 +0,0 @@
#---------------------------------*- sh -*-------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
#------------------------------------------------------------------------------
# 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/ParaViewFunctions
#
# Description
# ParaView make/install helper functions
#
#------------------------------------------------------------------------------
# buildBASE, installBASE defined from tools/ThirdPartyFunctions
#
# Where things are or should be put
# ParaView_VERSION and ParaView_MAJOR should already have been set
#
# ParaView_SOURCE_DIR : location of the original sources
# ParaView_BINARY_DIR : location of the build
# ParaView_DIR : location of the installed program
#
setParaViewDirs()
{
ParaView_SOURCE_DIR=$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION
[ -d "$ParaView_SOURCE_DIR" ] || {
echo "did not find ParaView-$ParaView_VERSION in these directories:"
echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR"
echo
echo "abort build"
exit 1
}
# ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION${OBJ_ADD:+-$OBJ_ADD}
ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION
# ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION${OBJ_ADD:+-$OBJ_ADD}
ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION
export ParaView_SOURCE_DIR ParaView_BINARY_DIR ParaView_DIR
echo
echo "ParaView_SOURCE_DIR=$ParaView_SOURCE_DIR"
echo "ParaView_BINARY_DIR=$ParaView_BINARY_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
#
# $1 can contain something something like 4.4.0, paraview-4.4.0, ParaView-4.0.0
#
setParaViewVersion()
{
[ $# -gt 0 ] || {
echo "Error: function setParaViewVersion() called without an argument"
exit 1
}
ParaView_VERSION="${1##*-}"
# The major version is "<digits>.<digits>"
ParaView_MAJOR=$(echo $ParaView_VERSION | \
sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/')
export ParaView_VERSION ParaView_MAJOR
}
#------------------------------------------------------------------------------
#
# Compare version information (specified vs what is found in CMakeLists.txt)
# Parse this type of content:
# set (PARAVIEW_VERSION_FULL "3.98.1")
#
checkVersion()
{
local ver=$(
sed -ne 's/^ *set *( *PARAVIEW_VERSION_FULL[ "]*\([.0-9]*\).*$/\1/ip' \
$ParaView_SOURCE_DIR/CMakeLists.txt
)
if [ "$ParaView_VERSION" != "$ver" ]
then
echo "MISMATCH!"
echo " specified $ParaView_VERSION"
echo " found ${ver:-NONE}"
fi
}
#
# Set CMake cache variables
#
addCMakeVariable()
{
while [ -n "$1" ]
do
CMAKE_VARIABLES="$CMAKE_VARIABLES -D$1"
shift
done
}
#
# Verbose makefiles
#
addVerbosity()
{
if [ "${withVERBOSE:=false}" = true ]
then
addCMakeVariable "CMAKE_VERBOSE_MAKEFILE=TRUE"
fi
}
#
# Define options for mpi support
#
addMpiSupport()
{
if [ "${withMPI:=false}" != true ]
then
return
fi
OBJ_ADD="$OBJ_ADD-mpi"
addCMakeVariable "PARAVIEW_USE_MPI=ON VTK_USE_MPI=ON"
addCMakeVariable "VTK_MPI_MAX_NUMPROCS=$MPI_MAX_PROCS"
}
#
# Define options for python support
#
addPythonSupport()
{
if [ "${withPYTHON:=false}" != true ]
then
return
fi
OBJ_ADD="$OBJ_ADD-py"
if pythonBin=$(which python 2>/dev/null)
then
if [ -n "$PYTHON_LIBRARY" ]
then
# Check $PYTHON_LIBRARY if it has been set
if [ ! -e "$PYTHON_LIBRARY" ]
then
echo "*** Error: libpython not found at location specified " \
"by -pythnon-lib input: PYTHON_LIBRARY=$PYTHON_LIBRARY"
fi
else
# Try to get $PYTHON_LIBRARY from dynamically linked binary
PYTHON_LIBRARY=$(ldd $pythonBin | \
sed -ne '/libpython/s/.* => \(.*\) (.*/\1/p')
[ -e "$PYTHON_LIBRARY" ] || {
echo "*** Error: Unable to determine path to python library."
}
fi
[ -e "$PYTHON_LIBRARY" ] || {
echo " Please set the full path to the python library "
echo " (including libpython) using the -python-lib option, "
echo " or deactivate python support by not using the -python "
echo " option"
exit 1
}
pythonMajor=$(echo $PYTHON_LIBRARY | sed 's/.*libpython\(.*\)\.so.*/\1/')
pythonInclude=/usr/include/python$pythonMajor
# Note - we could also allow for a PYTHON_INCLUDE variable ...
[ -d "$pythonInclude" ] || {
echo " No python headers found in $pythonInclude/"
echo " Please install python headers or deactivate "
echo " python support by not using the -python option"
exit 1
}
addCMakeVariable "PARAVIEW_ENABLE_PYTHON=ON"
addCMakeVariable "PYTHON_INCLUDE_PATH=$pythonInclude"
addCMakeVariable "PYTHON_LIBRARY=$PYTHON_LIBRARY"
echo "----"
echo "Python information:"
echo " executable : $pythonBin"
echo " version : $pythonMajor"
echo " include path : $pythonInclude"
echo " library : $PYTHON_LIBRARY"
unset pythonBin pythonInclude pythonMajor
else
echo "*** Error: python not found"
echo "*** Deactivate python support by not using the -python "
echo "*** option"
exit 1
fi
}
#
# Define options for mesa support
#
addMesaSupport()
{
if [ "${withMESA:=false}" != true ]
then
return
fi
if [ -d "$MESA_INCLUDE" -a -f "$MESA_LIBRARY" ]
then
OBJ_ADD="$OBJ_ADD-mesa"
addCMakeVariable "VTK_OPENGL_HAS_OSMESA:BOOL=ON"
addCMakeVariable "OSMESA_INCLUDE_DIR=$MESA_INCLUDE"
addCMakeVariable "OSMESA_LIBRARY=$MESA_LIBRARY"
else
echo "*** Error: no MESA information found"
echo "*** Deactivate MESA support by not using the -mesa option, "
echo "*** or set the correct paths for:"
echo "*** -mesa-include ($MESA_INCLUDE)"
echo "*** -mesa-lib ($MESA_LIBRARY)"
exit 1
fi
}
addQtSupport()
{
QtVersion=none
if [ "${withQT:=false}" != true ]
then
return
fi
addCMakeVariable "PARAVIEW_BUILD_QT_GUI=ON"
local qmake=$(findQtMake)
# Check qmake can be found
if type $qmake >/dev/null 2>&1
then
# Check the Qt version selected
# parse -> "Using Qt version X.Y.Z in ..."
QtVersion=$($qmake -query QT_VERSION)
# Split Major.Minor.Revision - could also use IFS hacking
set -- $(echo "$QtVersion" | sed -e 's/\./ /g')
QtMajor=$1
QtMinor=$2
if [ $QtMajor -ne 4 -o $QtMajor -eq 4 -a $QtMinor -lt 5 ]
then
echo "*** Error: Qt version provided < 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 "*** -qmake /usr/local/qt-4.6.2/bin/qmake"
echo "*** -qmake $installBASE/qt-4.6.2/bin/qmake"
exit 1
fi
else
echo "*** Error: cannot find qmake either at \$QMAKE_PATH or in current \$PATH"
exit 1
fi
}
#
# Configure via cmake, but don't actually build anything
#
configParaView()
{
local cmake=$(findCMake)
# Remove any existing build folder and recreate
if [ -d $ParaView_BINARY_DIR ]
then
echo "removing old build directory"
echo " $ParaView_BINARY_DIR"
rm -rf $ParaView_BINARY_DIR
fi
mkdir -p $ParaView_BINARY_DIR
cd $ParaView_BINARY_DIR || exit 1 # Change to build folder
echo "----"
echo "Configuring paraview-$ParaView_VERSION (major version: $ParaView_MAJOR)"
echo " MPI support : ${withMPI:-false}"
echo " Python support : ${withPYTHON:-false}"
echo " MESA support : ${withMESA:-false}"
echo " GL2 rendering : false"
echo " Qt dev support : ${withQT:-false}"
echo " Source : $ParaView_SOURCE_DIR"
echo " Build : $ParaView_BINARY_DIR"
echo " Target : $ParaView_DIR"
echo " Cmake : $cmake"
echo "----"
echo
echo "$cmake" \
-DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \
$CMAKE_VARIABLES \
$ParaView_SOURCE_DIR
echo
echo "----"
echo
# Run cmake to create Makefiles
$cmake -Wno-dev \
-DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \
$CMAKE_VARIABLES \
$ParaView_SOURCE_DIR
}
#
# Invoke make
# also link bin/ to lib/paraview-* for development without installation
#
makeParaView()
{
cd $ParaView_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
#
installParaView()
{
cd $ParaView_BINARY_DIR || exit 1 # Change to build folder
echo " Installing ParaView to $ParaView_DIR"
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
---
Installation complete for paraview-$ParaView_VERSION
Now update the environment by running:
wmREFRESH
---
INFO
}
#------------------------------------------------------------------------------
# Clear the referenced variables before using any of the functions
unset withMPI withVERBOSE
unset withQT QMAKE_PATH
unset withMESA MESA_INCLUDE MESA_LIBRARY
unset withPYTHON PYTHON_INCLUDE PYTHON_LIBRARY
unset CMAKE_VARIABLES
unset OBJ_ADD
# Start with these general settings
addCMakeVariable "VTK_USE_TK: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"
addCMakeVariable "PARAVIEW_INSTALL_DEVELOPMENT:BOOL=ON"
# Don't build test tree
addCMakeVariable "BUILD_TESTING:BOOL=OFF"
# remove dependency on WebKit
# addCMakeVariable VTK_QT_USE_WEBKIT:BOOL=OFF
#------------------------------------------------------------------------------

View File

@ -29,7 +29,7 @@
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# buildBASE, installBASE defined from tools/ThirdPartyFunctions # sourceBASE, buildBASE, installBASE defined in tools/ThirdPartyFunctions
# #
# Where things are or should be put # Where things are or should be put
@ -41,11 +41,21 @@
# #
setParaViewDirs() setParaViewDirs()
{ {
ParaView_SOURCE_DIR=$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION set -- "ParaView-$ParaView_VERSION" "ParaView-v$ParaView_VERSION"
unset ParaView_SOURCE_DIR
for i
do
ParaView_SOURCE_DIR="$sourceBASE/$i"
[ -d "$ParaView_SOURCE_DIR" ] && break
done
[ -d "$ParaView_SOURCE_DIR" ] || { [ -d "$ParaView_SOURCE_DIR" ] || {
echo "did not find ParaView-$ParaView_VERSION in these directories:" echo "Did not locate ParaView version:"
echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR" while [ "$#" -ge 1 ]; do echo " $1"; shift; done
echo
echo "In the directory:"
echo " $sourceBASE"
echo echo
echo "abort build" echo "abort build"
exit 1 exit 1
@ -107,9 +117,9 @@ checkVersion()
if [ "$ParaView_VERSION" != "$ver" ] if [ "$ParaView_VERSION" != "$ver" ]
then then
echo "MISMATCH!" echo "(${ver:-none}) mismatch?"
echo " specified $ParaView_VERSION" else
echo " found ${ver:-NONE}" echo "(${ver:-none})"
fi fi
} }
@ -297,23 +307,31 @@ addQtSupport()
# parse -> "Using Qt version X.Y.Z in ..." # parse -> "Using Qt version X.Y.Z in ..."
QtVersion=$($qmake -query QT_VERSION) QtVersion=$($qmake -query QT_VERSION)
# Split Major.Minor.Revision - could also use IFS hacking case "$QtVersion" in
set -- $(echo "$QtVersion" | sed -e 's/\./ /g') 3.* | 4.[0-4]*)
# QT is too old
cat <<ERROR
----
Error: ${0##*/}
QtMajor=$1 QT version ($QtVersion) provided < 4.5
QtMinor=$2 Please use the -qmake option to specify the location of a newer QT version
For example,
if [ $QtMajor -lt 4 -o $QtMajor -eq 4 -a $QtMinor -lt 5 ] ... -qmake /usr/local/qt-4.6.2/bin/qmake
then ... -qmake $installBASE/qt-4.6.2/bin/qmake
echo "*** Error: Qt version provided < 4.5" ----
echo "*** Please use the -qmake option to specify the location of a version of Qt >= 4.5" ERROR
echo "*** e.g."
echo "*** -qmake /usr/local/qt-4.6.2/bin/qmake"
echo "*** -qmake $installBASE/qt-4.6.2/bin/qmake"
exit 1 exit 1
fi ;;
5.*)
# QT4 is the default, must specify QT5 explicitly
addCMakeVariable "PARAVIEW_QT_VERSION:STRING=5"
;;
esac
else else
echo "*** Error: cannot find qmake either at \$QMAKE_PATH or in current \$PATH" echo "Error: cannot find qmake either at \$QMAKE_PATH or in current \$PATH"
echo
exit 1 exit 1
fi fi
} }
@ -415,7 +433,7 @@ cat<< INFO
ParaView_DIR=$ParaView_DIR ParaView_DIR=$ParaView_DIR
You may need to update the OpenFOAM environment by running: You may need to update the OpenFOAM environment by running:
wmREFRESH wmRefresh
--- ---
INFO INFO
} }

View File

@ -31,11 +31,11 @@
# Define WM_NCOMPPROCS always. # Define WM_NCOMPPROCS always.
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Define the normal build and prefix directories # The normal locations for source, build and installation (prefix-dir)
sourceBASE=$WM_THIRD_PARTY_DIR
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
@ -89,6 +89,7 @@ _foamIsSystem()
# try to locate cmake according to the CMAKE_PATH # try to locate cmake according to the CMAKE_PATH
# or just use what is found in the path # or just use what is found in the path
# #
unset CMAKE_PATH # clear when first loaded
findCMake() findCMake()
{ {
local candidate local candidate
@ -150,7 +151,7 @@ NOT_FOUND
fi fi
# Default to use the path, try resolving (so we know what we are using) # Default to use the path, try resolving (so we know what we are using)
foundExe=$(command -v cmake 2> /dev/null) || foundExe=qmake foundExe=$(command -v cmake 2> /dev/null) || foundExe=cmake
echo "Using cmake=${foundExe:-NotFound}" 1>&2 echo "Using cmake=${foundExe:-NotFound}" 1>&2
echo "${foundExe:-cmake}" echo "${foundExe:-cmake}"
} }
@ -160,6 +161,7 @@ NOT_FOUND
# try to locate qmake according to the QMAKE_PATH # try to locate qmake according to the QMAKE_PATH
# or just use what is found in the path # or just use what is found in the path
# #
unset QMAKE_PATH # clear when first loaded
findQtMake() findQtMake()
{ {
local candidate local candidate
@ -323,7 +325,7 @@ applyPatch()
else else
echo "apply patch for $pkg" echo "apply patch for $pkg"
touch "$sentinel" touch "$sentinel"
patch -p1 < $patch 2>&1 | tee $sentinel patch -b -l -p1 < $patch 2>&1 | tee $sentinel
fi fi
) )
else else

View File

@ -30,7 +30,7 @@
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# buildBASE, installBASE defined from tools/ThirdPartyFunctions # sourceBASE, buildBASE, installBASE defined in tools/ThirdPartyFunctions
# #
# Where things are or should be put # Where things are or should be put
@ -42,11 +42,21 @@
# #
setVtkDirs() setVtkDirs()
{ {
VTK_SOURCE_DIR=$WM_THIRD_PARTY_DIR/VTK-$VTK_VERSION set -- "VTK-$VTK_VERSION" "VTK-v$VTK_VERSION"
unset VTK_SOURCE_DIR
for i
do
VTK_SOURCE_DIR="$sourceBASE/$i"
[ -d "$VTK_SOURCE_DIR" ] && break
done
[ -d "$VTK_SOURCE_DIR" ] || { [ -d "$VTK_SOURCE_DIR" ] || {
echo "did not find VTK-$VTK_VERSION in these directories:" echo "Did not locate VTK version:"
echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR" while [ "$#" -ge 1 ]; do echo " $1"; shift; done
echo
echo "In the directory:"
echo " $sourceBASE"
echo echo
echo "abort build" echo "abort build"
exit 1 exit 1

391
makeADIOS
View File

@ -26,14 +26,18 @@
# makeADIOS # makeADIOS
# #
# Description # Description
# Build script for ADIOS (and MXML) # Build script for ADIOS
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
adiosPACKAGE=adios-git # Get version info
mxmlPACKAGE=mxml-2.9 . $WM_PROJECT_DIR/etc/config.sh/functions
unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/ADIOS)
adiosPACKAGE=${adios_version:-adios-none}
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# 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."
@ -42,32 +46,31 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
} }
. etc/tools/ThirdPartyFunctions . etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
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] [adios-VERSION] [mxml-VERSION] usage: ${0##*/} [OPTION] [adios-VERSION]
options: options:
-cmake PATH With cmake from the path given
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX -gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
-help -help
* Build ADIOS+MXML * Build ADIOS
$adiosPACKAGE $adiosPACKAGE
$mxmlPACKAGE
USAGE USAGE
exit 1 exit 1
} }
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# ensure configure gets the correct C/C++ compiler # Export WM settings in a form that GNU configure recognizes
[ -n "$WM_CC" ] && export CC="$WM_CC" [ -n "$WM_CC" ] && export CC="$WM_CC"
[ -n "$WM_CXX" ] && export CXX="$WM_CXX" [ -n "$WM_CXX" ] && export CXX="$WM_CXX"
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
# Parse options
# parse options
while [ "$#" -gt 0 ] while [ "$#" -gt 0 ]
do do
case "$1" in case "$1" in
@ -78,11 +81,13 @@ do
export CC=gcc # use gcc/g++ export CC=gcc # use gcc/g++
export CXX=g++ export CXX=g++
;; ;;
adios-[1-9]* | adios-git) -cmake)
adiosPACKAGE="${1%%/}" [ "$#" -ge 2 ] || die "'$1' option requires an argument"
CMAKE_PATH="${2%%/}"
shift
;; ;;
mxml-[1-9]*) ADIOS-[1-9]* | adios-[1-9]* | ADIOS-git* | adios-git*)
mxmlPACKAGE="${1%%/}" adiosPACKAGE="${1%%/}"
;; ;;
*) *)
die "unknown option/argument: '$1'" die "unknown option/argument: '$1'"
@ -91,127 +96,273 @@ do
shift shift
done done
#------------------------------------------------------------------------------ [ -n "$adiosPACKAGE" ] || die "The adios-VERSION was not specified"
MXML_ARCH_PATH=$installBASE/$mxmlPACKAGE # nothing to build
ADIOS_ARCH_PATH=$installBASE/$adiosPACKAGE if _foamIsNone "$adiosPACKAGE"
# build MXML - not needed with more recent ADIOS
if false
then then
echo echo "Using adios-none (skip ThirdParty build of ADIOS)"
echo ======================================== exit 0
echo "Build mxml library $mxmlPACKAGE" elif _foamIsSystem "$adiosPACKAGE"
echo then
echo "Using adios-system"
if [ -f $MXML_ARCH_PATH/include/mxml.h \ exit 0
-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 fi
# build ADIOS #------------------------------------------------------------------------------
#
# Build ADIOS
# ADIOS_SOURCE_DIR : location of the original sources
# ADIOS_ARCH_PATH : installation directory
ADIOS_SOURCE_DIR=$sourceBASE/$adiosPACKAGE
ADIOS_ARCH_PATH=$installBASE/$adiosPACKAGE
: ${FOAM_MPI:=dummy}
echo echo
echo ======================================== echo ========================================
echo "Build adios library $adiosPACKAGE" echo "Build adios library $adiosPACKAGE for $FOAM_MPI"
echo 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 # Manual adjustments to adios config
if [ -d "$ibDir/include" ] #
then adjustADIOS()
configOpt="$configOpt --with-infiniband=$ibDir" {
fi # Rename libraries according to FOAM_MPI
## $configOpt="$configOpt --with-hdf5=..." (
cd $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH || exit 1
# for externally compiled MXML if [ "$FOAM_MPI" != dummy ]
# configOpt="$configOpt --with-mxml=$MXML_ARCH_PATH" then
\mv -f libadios.a libadios_$FOAM_MPI.a
\mv -f libadiosread.a libadiosread_$FOAM_MPI.a
fi
\mv -f libadios_nompi.a libadios_dummy.a
\mv -f libadiosread_nompi.a libadiosread_dummy.a
# end of configuration options echo
# ---------------------------- echo "ADIOS library renamed to libadios_$FOAM_MPI"
echo
)
sourceDIR=$WM_THIRD_PARTY_DIR/$adiosPACKAGE # We don't need/use XML things
buildDIR=$buildBASE/$adiosPACKAGE \rm -f $ADIOS_ARCH_PATH/bin/adios_lint
cd $sourceDIR || exit 1 # Replace resolved paths with variables
export GIT_DIR=$sourceDIR/.git echo "Adjust prefix for ADIOS"
for i in \
$ADIOS_ARCH_PATH/bin/adios_config \
$ADIOS_ARCH_PATH/etc/adios_config.flags \
;
do
[ -f "$i" ] || {
echo " no such file - '$i'"
continue
}
if sed -i -e 's|'"$WM_THIRD_PARTY_DIR"'|$WM_THIRD_PARTY_DIR|g' $i
then
echo " '$i'"
else
echo " problems with '$i'"
fi
done
# Remove any existing build folder and recreate # Adjust the config flags file:
\rm -rf $buildDIR 2>/dev/null # * Remove references to Fortran libraries (disabled in configure)
mkdir -p $buildDIR # * Remove references to deprecated version 1 API
# * Cleanup excessive whitespace
# * Handle renamed libraries:
# - libadios -> libadios_$FOAM_MPI
# - libadios_nompi -> libadios_dummy
#
echo "Adjust library names for ADIOS"
for i in \
$ADIOS_ARCH_PATH/etc/adios_config.flags \
;
do
[ -f "$i" ] || {
echo " no such file - '$i'"
continue
}
[ -e Makefile ] && make clean 2>/dev/null # for safety if sed -i \
-e '/_FLIB=/d' \
-e '/_V1_INC=/d' \
-e 's| *| |g' \
-e 's|\(-ladios[a-z]*_\)nompi |\1dummy |g' \
$i
then
echo " '$i'"
else
echo " problems with '$i'"
fi
[ -f configure ] || { if [ "$FOAM_MPI" != dummy ]
echo "no configure for $adiosPACKAGE ... trying autogen" then
./autogen.sh sed -i -e 's|\(-ladios[a-z]*\) |\1_'"$FOAM_MPI |g" $i || \
echo " problems with '$i'"
fi
done
}
#
# List ADIOS methods/configuration
#
listMethods()
{
[ -f $ADIOS_ARCH_PATH/bin/adios_config ] || {
echo "Warning: no adios_config"
return 1
} }
# installs into lib64/ echo "==============="
cd $buildDIR && \
CC=mpicc CXX=mpicxx CFLAGS="-fPIC" $sourceDIR/configure \ # May have problems listing parallel methods (eg, transport key missing)
--prefix=$ADIOS_ARCH_PATH \ if $ADIOS_ARCH_PATH/bin/adios_config -m >/dev/null 2>&1
--disable-fortran \ then
--with-pic \ $ADIOS_ARCH_PATH/bin/adios_config -m 2>/dev/null
--without-fastbit \ else
$configOpt \ echo "Warning: could not list parallel methods"
&& make -j $WM_NCOMPPROCS all \ # Fallback to serial methods
&& make install \ $ADIOS_ARCH_PATH/bin/adios_config -s -m 2>/dev/null
&& echo "Built: $adiosPACKAGE" \ fi || echo "Warning: could not list configured methods"
&& rsync -a --no-r $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/ $FOAM_EXT_LIBBIN/$FOAM_MPI/ echo "==============="
) || {
echo "Error building: $adiosPACKAGE"
} }
# Needs future adjustment
# - for shared library
# - for mpi-specific library locations
if [ -f $ADIOS_ARCH_PATH/include/adios.h \
-a -r $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libadios_${FOAM_MPI}.a ]
then
echo " ADIOS header in $ADIOS_ARCH_PATH/include"
### echo " ADIOS libs in $FOAM_EXT_LIBBIN" # dynamic
echo " ADIOS libs in $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" # static
listMethods
elif [ -z "$CMAKE_PATH" ]
then
echo "Starting build: $adiosPACKAGE (using configure)"
echo
(
# configuration options:
unset configOpt
# Add InfiniBand support
ibDir=/usr/local/ofed
if [ -d "$ibDir" -a "$FOAM_MPI" != dummy ]
then
configOpt="$configOpt --with-infiniband=$ibDir"
fi
# Transport layers
if [ -f "/usr/include/bzlib.h" ]
then
configOpt="$configOpt --with-bzip2"
fi
if [ -f "/usr/include/zlib.h" ]
then
configOpt="$configOpt --with-zlib"
fi
# Other types of support
## $configOpt="$configOpt --with-hdf5=..."
## $configOpt="$configOpt --with-lustre=..."
## configOpt="$configOpt --enable-research-transports"
# end of configuration options
# ----------------------------
buildDIR=$buildBASE/$adiosPACKAGE
cd $ADIOS_SOURCE_DIR || exit 1
[ -e Makefile ] && make distclean 2>/dev/null
export GIT_DIR=$ADIOS_SOURCE_DIR/.git
applyPatch $adiosPACKAGE $ADIOS_SOURCE_DIR
# Remove any existing build folder and recreate
rm -rf $ADIOS_ARCH_DIR
rm -rf $buildDIR 2>/dev/null
mkdir -p $buildDIR
[ -f configure ] || {
echo "no configure for $adiosPACKAGE ... trying autogen"
./autogen.sh
}
# May not work properly with FOAM_MPI = dummy
if [ "$FOAM_MPI" = dummy ]
then
configOpt="$configOpt --without-mpi"
else
CC=mpicc
CXX=mpicxx
fi
# Install into lib64/
cd $buildDIR && $ADIOS_SOURCE_DIR/configure \
--prefix=$ADIOS_ARCH_PATH \
--libdir=$ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
--disable-fortran \
--with-pic \
--without-fastbit \
$configOpt \
&& make -j $WM_NCOMPPROCS all \
&& make install \
&& echo "Built: $adiosPACKAGE" \
&& adjustADIOS \
&& listMethods
) || {
echo "Error building: $adiosPACKAGE"
}
else
# CMake options often lag the configure ones
echo "Starting build: $adiosPACKAGE (using cmake)"
echo
(
buildDIR=$buildBASE/$adiosPACKAGE
cd $ADIOS_SOURCE_DIR || exit 1
export GIT_DIR=$ADIOS_SOURCE_DIR/.git
applyPatch $adiosPACKAGE $ADIOS_SOURCE_DIR
# Remove any existing build folder and recreate
rm -rf $ADIOS_ARCH_DIR
rm -rf $buildDIR 2>/dev/null
mkdir -p $buildDIR
# May not work properly with FOAM_MPI = dummy
if [ "$FOAM_MPI" = dummy ]
then
configOpt="$configOpt --without-mpi"
else
CC=mpicc
CXX=mpicxx
fi
cmake=$(findCMake)
# Install into lib64/
cd $buildDIR && $cmake \
-DCMAKE_INSTALL_PREFIX=$ADIOS_ARCH_PATH \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_FORTRAN:BOOL=FALSE \
$ADIOS_SOURCE_DIR \
&& make -j $WM_NCOMPPROCS all \
&& make install \
&& echo "Built: $adiosPACKAGE" \
&& adjustADIOS \
&& listMethods
) || {
echo "Error building: $adiosPACKAGE"
}
fi fi
# ----------------------------------------------------------------- end-of-file # ----------------------------------------------------------------- end-of-file

View File

@ -29,7 +29,6 @@
# Build CD-adapco's ccmio library # Build CD-adapco's ccmio library
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Get version info # Get version info
. $WM_PROJECT_DIR/etc/config.sh/functions . $WM_PROJECT_DIR/etc/config.sh/functions
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/ccmio) _foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/ccmio)
@ -38,7 +37,7 @@ ccmioPACKAGE=${ccmio_version:-libccmio-2.6.1}
targetType=lib targetType=lib
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# run from third-party directory only # 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"
@ -53,7 +52,6 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
} }
. etc/tools/ThirdPartyFunctions . etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
usage() usage()
{ {
exec 1>&2 exec 1>&2
@ -79,6 +77,7 @@ options:
USAGE USAGE
exit 1 exit 1
} }
#------------------------------------------------------------------------------
# Parse options # Parse options
@ -102,10 +101,10 @@ do
done done
# assert: directory must be available # assert: directory must be available
[ -d "${ccmioPACKAGE}" ] || die "missing source directory '$ccmioPACKAGE'" [ -d "$ccmioPACKAGE" ] || die "missing source directory '$ccmioPACKAGE'"
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
CCMIO_SOURCE_DIR=$sourceBASE/$ccmioPACKAGE
CCMIO_ARCH_PATH=$installBASE/$ccmioPACKAGE CCMIO_ARCH_PATH=$installBASE/$ccmioPACKAGE
# #
@ -113,7 +112,7 @@ CCMIO_ARCH_PATH=$installBASE/$ccmioPACKAGE
# #
echo "---------------" echo "---------------"
( (
cd $ccmioPACKAGE || exit 1 cd $CCMIO_SOURCE_DIR || exit 1
incDIR=$CCMIO_ARCH_PATH/include/libccmio incDIR=$CCMIO_ARCH_PATH/include/libccmio
libDIR=$CCMIO_ARCH_PATH/lib libDIR=$CCMIO_ARCH_PATH/lib
@ -135,5 +134,4 @@ echo "---------------"
fi fi
) )
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

167
makeCGAL
View File

@ -35,13 +35,14 @@
# makeCGAL boost-system gmp-system # makeCGAL boost-system gmp-system
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Get CGAL, boost and gmp/mpfr versions # Get CGAL, boost and gmp/mpfr versions
. $WM_PROJECT_DIR/etc/config.sh/functions . $WM_PROJECT_DIR/etc/config.sh/functions
unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only
unset BOOST_ARCH_PATH CGAL_ARCH_PATH # purge current values
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL) # compiler first, let CGAL config override GMP (eg, when there is no GMP)
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/compiler) _foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/compiler)
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL)
boostPACKAGE=${boost_version:-boost-system} boostPACKAGE=${boost_version:-boost-system}
gmpPACKAGE=${gmp_version:-gmp-system} gmpPACKAGE=${gmp_version:-gmp-system}
@ -59,7 +60,6 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
. etc/tools/ThirdPartyFunctions . etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
Script="${0##*/}" 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
@ -67,7 +67,9 @@ usage() {
usage: $Script [OPTION] [CGAL-VERSION] [boost-VERSION] [gmp-VERSION] [mpfr-VERSION] usage: $Script [OPTION] [CGAL-VERSION] [boost-VERSION] [gmp-VERSION] [mpfr-VERSION]
options: options:
-cmake PATH with cmake from the path given
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX -gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
-no-lib compile CGAL for use in headers only mode (since CGAL 4.9)
-system use system versions for boost/gmp/mpfr -system use system versions for boost/gmp/mpfr
-help -help
@ -82,15 +84,18 @@ 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,
$Script boost-system gmp-system $Script boost-system gmp-system
Use gmp-none to disable use of gmp/mpfr (eg, not available)
USAGE USAGE
exit 1 exit 1
} }
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Ensure CMake gets the correct C/C++ compiler # Ensure CMake gets the correct C/C++ compiler
[ -n "$WM_CC" ] && export CC="$WM_CCX" [ -n "$WM_CC" ] && export CC="$WM_CCX"
[ -n "$WM_CXX" ] && export CXX="$WM_CXX" [ -n "$WM_CXX" ] && export CXX="$WM_CXX"
unset optHeadersOnly
# Parse options # Parse options
while [ "$#" -gt 0 ] while [ "$#" -gt 0 ]
do do
@ -105,22 +110,33 @@ do
export CC=gcc # use gcc/g++ export CC=gcc # use gcc/g++
export CXX=g++ export CXX=g++
;; ;;
-cmake)
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
CMAKE_PATH="${2%%/}"
shift
;;
-sys*) -sys*)
gmpPACKAGE="gmp-system" gmpPACKAGE="gmp-system"
mpfrPACKAGE="mpfr-system" mpfrPACKAGE="mpfr-system"
boostPACKAGE="boost-system" boostPACKAGE="boost-system"
unset BOOST_ARCH_PATH # avoid inconsistency
;; ;;
gmp-[4-9]* | gmp-system) -no-lib)
optHeadersOnly=true
;;
gmp-[4-9]* | gmp-system | gmp-none)
gmpPACKAGE="${1%%/}" gmpPACKAGE="${1%%/}"
;; ;;
mpfr-[2-9]* | mpfr-system) mpfr-[2-9]* | mpfr-system | mpfr-none)
mpfrPACKAGE="${1%%/}" mpfrPACKAGE="${1%%/}"
;; ;;
CGAL-[0-9]*) CGAL-[0-9]*)
cgalPACKAGE="${1%%/}" cgalPACKAGE="${1%%/}"
unset CGAL_ARCH_PATH # avoid inconsistency
;; ;;
boost-[0-9]* | boost_[0-9]* | boost-system ) boost-[0-9]* | boost_[0-9]* | boost-system )
boostPACKAGE="${1%%/}" boostPACKAGE="${1%%/}"
unset BOOST_ARCH_PATH # avoid inconsistency
;; ;;
*) *)
die "unknown option/argument: '$1'" die "unknown option/argument: '$1'"
@ -131,13 +147,13 @@ done
[ -n "$cgalPACKAGE" ] || die "The cgal-VERSION was not specified" [ -n "$cgalPACKAGE" ] || die "The cgal-VERSION was not specified"
# nothing to build # Nothing to build
if _foamIsNone "$boostPACKAGE" if _foamIsNone $boostPACKAGE
then then
echo "Using boost-none (skip ThirdParty build of BOOST/CGAL)" echo "Using boost-none (skip ThirdParty build of BOOST/CGAL)"
exit 0 exit 0
fi fi
if _foamIsNone "$cgalPACKAGE" if _foamIsNone $cgalPACKAGE
then then
echo "Using cgal-none (skip ThirdParty build of CGAL)" echo "Using cgal-none (skip ThirdParty build of CGAL)"
exit 0 exit 0
@ -146,31 +162,37 @@ fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# #
# Build Boost # Build Boost
# For 64-bit # For 64-bit:
# - Third-Party builds into 'lib'
# - system is normally built into 'lib64' # - system is normally built into 'lib64'
# - use Third-Party 'lib64' for consistency.
# Boost 1_62_0 and older normally build into 'lib'.
# #
# BOOST_ARCH_PATH : installation directory
# BOOST_SOURCE_DIR : location of the original sources # BOOST_SOURCE_DIR : location of the original sources
BOOST_ARCH_PATH=$installBASE/$boostPACKAGE BOOST_SOURCE_DIR=$sourceBASE/$boostPACKAGE
BOOST_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$boostPACKAGE : ${BOOST_ARCH_PATH:=$installBASE/$boostPACKAGE} # Fallback
if [ -d "$BOOST_ARCH_PATH" ] boostInc="$BOOST_ARCH_PATH/include"
then boostLib="$BOOST_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
boostInc="$BOOST_ARCH_PATH/include"
boostLib="$BOOST_ARCH_PATH/lib" if _foamIsSystem $boostPACKAGE
elif _foamIsSystem $BOOST_ARCH_PATH
then then
echo "Using boost-system (skip ThirdParty build of BOOST)" echo "Using boost-system (skip ThirdParty build of BOOST)"
boostInc="/usr/include" # Tagged as 'system' but could actually point to a central location
boostLib="/usr/lib$WM_COMPILER_LIB_ARCH" [ -d "$BOOST_ARCH_PATH/include" ] || {
else boostInc="/usr/include"
echo "Starting build: boost" boostLib="/usr/lib$WM_COMPILER_LIB_ARCH"
echo }
boostInc="$BOOST_ARCH_PATH/include" elif [ -f "$boostInc/boost/version.hpp" ]
boostLib="$BOOST_ARCH_PATH/lib" then
echo "Using $boostPACKAGE"
else
echo "Starting build: $boostPACKAGE"
echo
# Absolute path for --libdir
( (
cd $BOOST_SOURCE_DIR || exit 1 cd $BOOST_SOURCE_DIR || exit 1
@ -179,6 +201,7 @@ else
./bootstrap.sh \ ./bootstrap.sh \
--prefix=$BOOST_ARCH_PATH \ --prefix=$BOOST_ARCH_PATH \
--libdir=$boostLib \
--with-libraries=thread \ --with-libraries=thread \
--with-libraries=system \ --with-libraries=system \
&& ./bjam toolset=$WM_CC -j $WM_NCOMPPROCS install \ && ./bjam toolset=$WM_CC -j $WM_NCOMPPROCS install \
@ -190,7 +213,7 @@ else
fi fi
# nothing left to build # nothing left to build
if _foamIsSystem "$cgalPACKAGE" if _foamIsSystem $cgalPACKAGE
then then
echo "Using cgal-system (skip ThirdParty build of CGAL)" echo "Using cgal-system (skip ThirdParty build of CGAL)"
exit 0 exit 0
@ -225,26 +248,37 @@ SUMMARY
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# #
# Build CGAL # Build CGAL
# For 64-bit # For 64-bit:
# - Third-Party builds into 'lib'
# - system is normally built into 'lib64' # - system is normally built into 'lib64'
# - use Third-Party 'lib64' for consistency.
# CGAL-4.9 normally builds into 'lib64', older versions into 'lib'.
# #
# CGAL_SOURCE_DIR : location of the original sources # CGAL_SOURCE_DIR : location of the original sources
# CGAL_BINARY_DIR : location of the build # CGAL_BINARY_DIR : location of the build
# CGAL_DIR : location of the installed program # CGAL_ARCH_PATH : installation directory
CGAL_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$cgalPACKAGE CGAL_SOURCE_DIR=$sourceBASE/$cgalPACKAGE
CGAL_BINARY_DIR=$buildBASE/$cgalPACKAGE CGAL_BINARY_DIR=$buildBASE/$cgalPACKAGE
CGAL_ARCH_PATH=$installBASE/$cgalPACKAGE : ${CGAL_ARCH_PATH:=$installBASE/$cgalPACKAGE} # Fallback
CGAL_DIR=$CGAL_ARCH_PATH
# # gmp/mpfr are installed without compiler name
# gmp/mpfr installed without compiler name
installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH 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
# Enable/disable gmp/mpfr together
if _foamIsNone $gmpPACKAGE || _foamIsNone $mpfrPACKAGE
then
GMP_ARCH_PATH=none
MPFR_ARCH_PATH=none
elif _foamIsSystem $GMP_ARCH_PATH || _foamIsSystem $MPFR_ARCH_PATH
then
GMP_ARCH_PATH=system # for an accurate record
MPFR_ARCH_PATH=system
fi
# #
# build information recorded for later use # build information recorded for later use
# #
@ -255,12 +289,18 @@ 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) 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 cat<<BUILD_INFO > $buildInfoFile
# Information from OpenFOAM build on '$(date)'
#
CGAL=${CGAL_ARCH_PATH##*/} CGAL=${CGAL_ARCH_PATH##*/}
BOOST=${BOOST_ARCH_PATH##*/} BOOST=${BOOST_ARCH_PATH##*/}
GMP=${GMP_ARCH_PATH##*/} GMP=${GMP_ARCH_PATH##*/}
MPFR=${MPFR_ARCH_PATH##*/} MPFR=${MPFR_ARCH_PATH##*/}
CGAL_VERSION=$CGAL_VERSION CGAL_VERSION=$CGAL_VERSION
BOOST_VERSION=$BOOST_VERSION BOOST_VERSION=$BOOST_VERSION
CGAL_lib=lib$WM_COMPILER_LIB_ARCH
BOOST_lib=lib$WM_COMPILER_LIB_ARCH
CGAL_HEADER_ONLY=${optHeadersOnly:-false}
BUILD_INFO BUILD_INFO
} }
@ -287,6 +327,8 @@ cgalIsCurrent()
local info=$(cat $buildInfoFile 2>/dev/null) local info=$(cat $buildInfoFile 2>/dev/null)
[ -n "$info" ] || return 1 [ -n "$info" ] || return 1
local libDirName="lib$WM_COMPILER_LIB_ARCH"
echo "checking information from existing build ..." echo "checking information from existing build ..."
echo " ${CGAL_ARCH_PATH}" echo " ${CGAL_ARCH_PATH}"
@ -295,10 +337,13 @@ cgalIsCurrent()
infoValueEq GMP "${GMP_ARCH_PATH##*/}" "$info" || return 1 infoValueEq GMP "${GMP_ARCH_PATH##*/}" "$info" || return 1
infoValueEq MPFR "${MPFR_ARCH_PATH##*/}" "$info" || return 1 infoValueEq MPFR "${MPFR_ARCH_PATH##*/}" "$info" || return 1
infoValueEq BOOST_VERSION "${BOOST_VERSION}" "$info" || return 1 infoValueEq BOOST_VERSION "${BOOST_VERSION}" "$info" || return 1
infoValueEq CGAL_lib "$libDirName" "$info" || return 1
infoValueEq BOOST_lib "$libDirName" "$info" || return 1
return 0 return 0
} }
if cgalIsCurrent if cgalIsCurrent
then then
echo " ${CGAL_ARCH_PATH##*/} build appears to be up-to-date - skipping" echo " ${CGAL_ARCH_PATH##*/} build appears to be up-to-date - skipping"
@ -323,10 +368,21 @@ fi
echo "Configuring $cgalPACKAGE with boost $BOOST_VERSION" echo "Configuring $cgalPACKAGE with boost $BOOST_VERSION"
echo " Source : $CGAL_SOURCE_DIR" echo " Source : $CGAL_SOURCE_DIR"
echo " Build : $CGAL_BINARY_DIR" echo " Build : $CGAL_BINARY_DIR"
echo " Target : $CGAL_DIR" echo " Target : $CGAL_ARCH_PATH"
if [ -d "$BOOST_ARCH_PATH" ] # See http://doc.cgal.org/latest/Manual/installation.html
if _foamIsSystem $boostPACKAGE
then
echo " system : boost"
# Tagged as 'system' but could actually point to a central location
if [ -d "$BOOST_ARCH_PATH/include" ]
then
configBoost="-DBOOST_ROOT=$BOOST_ARCH_PATH"
fi
## For system - possible that /usr/lib64 not being found?
## configBoost="-DBoost_LIBRARY_DIRS=$boostLib"
elif [ -d "$BOOST_ARCH_PATH" ]
then then
echo " ThirdParty : boost" echo " ThirdParty : boost"
configBoost=$(cat <<CMAKE_OPTIONS configBoost=$(cat <<CMAKE_OPTIONS
@ -338,16 +394,17 @@ fi
-DBoost_SYSTEM_LIBRARY_RELEASE=$boostLib/libboost_system.so -DBoost_SYSTEM_LIBRARY_RELEASE=$boostLib/libboost_system.so
-DBoost_VERSION=$BOOST_VERSION -DBoost_VERSION=$BOOST_VERSION
CMAKE_OPTIONS CMAKE_OPTIONS
)
else
echo " system : boost"
configBoost=$(cat <<CMAKE_OPTIONS
-DBOOST_LIBRARYDIR=$boostLib
CMAKE_OPTIONS
) )
fi fi
if [ -d "$GMP_ARCH_PATH" ] if _foamIsSystem $GMP_ARCH_PATH
then
echo " system : gmp"
elif _foamIsNone $GMP_ARCH_PATH
then
echo " disabled : gmp"
configGmp="-DCGAL_DISABLE_GMP:BOOL=TRUE" # Also used for mpfr
elif [ -d "$GMP_ARCH_PATH" ]
then then
echo " ThirdParty : gmp" echo " ThirdParty : gmp"
configGmp=$(cat <<CMAKE_OPTIONS configGmp=$(cat <<CMAKE_OPTIONS
@ -359,10 +416,17 @@ CMAKE_OPTIONS
CMAKE_OPTIONS CMAKE_OPTIONS
) )
else else
echo " system : gmp" echo " system : gmp (did not find $GMP_ARCH_PATH)"
fi fi
if [ -d "$MPFR_ARCH_PATH" ] if _foamIsSystem $MPFR_ARCH_PATH
then
echo " system : mpfr"
elif _foamIsNone $MPFR_ARCH_PATH
then
echo " disabled : mpfr"
configGmp="-DCGAL_DISABLE_GMP:BOOL=TRUE" # Also used for mpfr
elif [ -d "$MPFR_ARCH_PATH" ]
then then
echo " ThirdParty : mpfr" echo " ThirdParty : mpfr"
configMpfr=$(cat <<CMAKE_OPTIONS configMpfr=$(cat <<CMAKE_OPTIONS
@ -372,19 +436,26 @@ CMAKE_OPTIONS
CMAKE_OPTIONS CMAKE_OPTIONS
) )
else else
echo " system : mpfr" echo " system : mpfr (did not find $MPFR_ARCH_PATH)"
fi fi
cmake=$(findCMake)
# For CGAL < 4.9, for installation into lib64/, not lib/
# Name only (not path) for CGAL_INSTALL_LIB_DIR
echo "----" echo "----"
set -x set -x
cmake \ $cmake \
-DCMAKE_INSTALL_PREFIX=$CGAL_ARCH_PATH \ -DCMAKE_INSTALL_PREFIX=$CGAL_ARCH_PATH \
-DCGAL_INSTALL_LIB_DIR=lib$WM_COMPILER_LIB_ARCH \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DWITH_CGAL_Qt5=OFF \ -DWITH_CGAL_Qt5=OFF \
${optHeadersOnly:+-DCGAL_HEADER_ONLY=TRUE} \
$configBoost $configGmp $configMpfr \ $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
set +x
echo "----" echo "----"
echo "create '\$CGAL_ARCH_PATH/share/files'" echo "create '\$CGAL_ARCH_PATH/share/files'"

View File

@ -29,11 +29,11 @@
# Build script for cmake # Build script for cmake
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Special purpose script, no default cmake version. # Special purpose script, no default version.
unset cmakePACKAGE unset cmakePACKAGE
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# 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."
@ -42,13 +42,12 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
} }
. etc/tools/ThirdPartyFunctions . etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
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] [cmake-VERSION] usage: ${0##*/} [OPTION] cmake-VERSION
options: options:
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX -gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
-help -help
@ -60,12 +59,11 @@ USAGE
exit 1 exit 1
} }
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Ensure CMake gets the correct C/CC++ compiler
# ensure CMake gets the correct C/CC++ compiler
[ -n "$WM_CC" ] && export CC="$WM_CC" [ -n "$WM_CC" ] && export CC="$WM_CC"
[ -n "$WM_CXX" ] && export CXX="$WM_CXX" [ -n "$WM_CXX" ] && export CXX="$WM_CXX"
# parse options # Parse options
while [ "$#" -gt 0 ] while [ "$#" -gt 0 ]
do do
case "$1" in case "$1" in
@ -89,36 +87,38 @@ done
[ -n "$cmakePACKAGE" ] || die "The cmake-VERSION was not specified" [ -n "$cmakePACKAGE" ] || die "The cmake-VERSION was not specified"
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
CMAKE_ARCH_PATH=$installBASE/$cmakePACKAGE
# #
# Build CMAKE # Build CMAKE
# # CMAKE_SOURCE_DIR : location of the original sources
echo "---------------" # CMAKE_ARCH_PATH : installation directory
CMAKE_SOURCE_DIR=$sourceBASE/$cmakePACKAGE
CMAKE_ARCH_PATH=$installBASE/$cmakePACKAGE
if [ -d "$CMAKE_ARCH_PATH" -a -r "$CMAKE_ARCH_PATH/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
echo "Starting build: $cmakePACKAGE" echo "Starting build: $cmakePACKAGE"
( (
sourceDIR=$WM_THIRD_PARTY_DIR/$cmakePACKAGE buildDIR=$buildBASE/$cmakePACKAGE
buildDIR=$buildBASE/$cmakePACKAGE
cd $sourceDIR || exit 1 cd $CMAKE_SOURCE_DIR || exit 1
make distclean 2>/dev/null make distclean 2>/dev/null
rm -rf $buildDIR rm -rf $buildDIR
mkdir -p $buildDIR mkdir -p $buildDIR
cd $buildDIR cd $buildDIR
$sourceDIR/bootstrap --prefix=$CMAKE_ARCH_PATH \ $CMAKE_SOURCE_DIR/bootstrap \
&& time make -j $WM_NCOMPPROCS \ --prefix=$CMAKE_ARCH_PATH \
&& make install \ && time make -j $WM_NCOMPPROCS \
&& echo "Built: $cmakePACKAGE" && make install \
) || { && echo "Built: $cmakePACKAGE"
echo "Error building: $cmakePACKAGE" ) || {
exit 1 echo "Error building: $cmakePACKAGE"
} exit 1
}
fi fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -29,7 +29,6 @@
# Build script for FFTW # Build script for FFTW
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Get FFTW versions # Get FFTW versions
. $WM_PROJECT_DIR/etc/config.sh/functions . $WM_PROJECT_DIR/etc/config.sh/functions
unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only
@ -48,14 +47,12 @@ 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: $Script [OPTION] [fftw-VERSION] usage: ${0##*/} [OPTION] [fftw-VERSION]
options: options:
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX -gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
-help -help
@ -67,8 +64,7 @@ USAGE
exit 1 exit 1
} }
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Ensure configure gets the correct C/C++ compiler
# ensure configure gets the correct C/C++ compiler
[ -n "$WM_CC" ] && export CC="$WM_CC" [ -n "$WM_CC" ] && export CC="$WM_CC"
[ -n "$WM_CXX" ] && export CXX="$WM_CXX" [ -n "$WM_CXX" ] && export CXX="$WM_CXX"
@ -98,14 +94,12 @@ done
[ -n "$fftwPACKAGE" ] || die "The fftw-VERSION was not specified" [ -n "$fftwPACKAGE" ] || die "The fftw-VERSION was not specified"
# nothing to build # Nothing to build
if _foamIsNone "$fftwPACKAGE" if _foamIsNone "$fftwPACKAGE"
then then
echo "Using fftw-none (skip ThirdParty build of FFTW)" echo "Using fftw-none (skip ThirdParty build of FFTW)"
exit 0 exit 0
fi elif _foamIsSystem "$fftwPACKAGE"
if _foamIsSystem "$fftwPACKAGE"
then then
echo "Using fftw-system (skip ThirdParty build of FFTW)" echo "Using fftw-system (skip ThirdParty build of FFTW)"
exit 0 exit 0
@ -121,9 +115,10 @@ fi
# - system is normally built into 'lib64' # - system is normally built into 'lib64'
# #
# FFTW_SOURCE_DIR : location of the original sources # FFTW_SOURCE_DIR : location of the original sources
# FFTW_ARCH_PATH : installation directory
FFTW_SOURCE_DIR=$sourceBASE/$fftwPACKAGE
FFTW_ARCH_PATH=$installBASE/$fftwPACKAGE 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" ] if [ -r "$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libfftw3.so" ]
then then
@ -169,5 +164,4 @@ else
} }
fi fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

11
makeGcc
View File

@ -88,8 +88,7 @@ USAGE
exit 1 exit 1
} }
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Build 32-bit libraries on 64-bit systems (normally not needed)
# build 32-bit libraries on 64-bit systems (normally not needed)
optMultilib=disable optMultilib=disable
unset optThreadSafe # unset=auto unset optThreadSafe # unset=auto
@ -181,7 +180,7 @@ else
echo "Starting build: $gmpPACKAGE" echo "Starting build: $gmpPACKAGE"
echo echo
( (
sourceDIR=$WM_THIRD_PARTY_DIR/$gmpPACKAGE sourceDIR=$sourceBASE/$gmpPACKAGE
buildDIR=$buildBASE/$gmpPACKAGE buildDIR=$buildBASE/$gmpPACKAGE
cd $sourceDIR || exit 1 cd $sourceDIR || exit 1
@ -233,7 +232,7 @@ else
echo "Starting build: $mpfrPACKAGE" echo "Starting build: $mpfrPACKAGE"
echo echo
( (
sourceDIR=$WM_THIRD_PARTY_DIR/$mpfrPACKAGE sourceDIR=$sourceBASE/$mpfrPACKAGE
buildDIR=$buildBASE/$mpfrPACKAGE buildDIR=$buildBASE/$mpfrPACKAGE
cd $sourceDIR || exit 1 cd $sourceDIR || exit 1
@ -289,7 +288,7 @@ else
echo "Starting build: $mpcPACKAGE" echo "Starting build: $mpcPACKAGE"
echo echo
( (
sourceDIR=$WM_THIRD_PARTY_DIR/$mpcPACKAGE sourceDIR=$sourceBASE/$mpcPACKAGE
buildDIR=$buildBASE/$mpcPACKAGE buildDIR=$buildBASE/$mpcPACKAGE
cd $sourceDIR || exit 1 cd $sourceDIR || exit 1
@ -345,7 +344,7 @@ else
echo "Starting build: $gccPACKAGE" echo "Starting build: $gccPACKAGE"
echo echo
( (
sourceDIR=$WM_THIRD_PARTY_DIR/$gccPACKAGE sourceDIR=$sourceBASE/$gccPACKAGE
buildDIR=$buildBASE/$gccPACKAGE buildDIR=$buildBASE/$gccPACKAGE
cd $sourceDIR || exit 1 cd $sourceDIR || exit 1

View File

@ -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) 2012 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2012 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.
@ -28,14 +28,17 @@
# Description # Description
# Build script for gperftools # Build script for gperftools
# #
# Note
#
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Get gperftools version
. $WM_PROJECT_DIR/etc/config.sh/functions
unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only
gperftoolsPACKAGE=gperftools-svn _foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/gperftools)
gperftoolsPACKAGE=${gperftools_version:-gperftools-system}
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# 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."
@ -44,13 +47,15 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
} }
. etc/tools/ThirdPartyFunctions . etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
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##*/} [gperftools-VERSION] usage: ${0##*/} [gperftools-VERSION]
options:
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
-help
* build gperftools * build gperftools
$gperftoolsPACKAGE $gperftoolsPACKAGE
@ -58,16 +63,23 @@ usage: ${0##*/} [gperftools-VERSION]
USAGE USAGE
exit 1 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
# parse options
while [ "$#" -gt 0 ] while [ "$#" -gt 0 ]
do do
case "$1" in case "$1" in
-h | -help) -h | -help)
usage usage
;; ;;
gperftools-[0-9]* | gperftools-svn*) -gcc)
export CC=gcc # use gcc/g++
export CXX=g++
;;
gperftools-[0-9]* | gperftools-svn* | gperftools-git)
gperftoolsPACKAGE="${1%%/}" gperftoolsPACKAGE="${1%%/}"
;; ;;
*) *)
@ -77,42 +89,54 @@ do
shift shift
done done
#------------------------------------------------------------------------------ [ -n "$gperftoolsPACKAGE" ] || die "The gperftools-VERSION was not specified"
# build/install without compiler name
prefixDIR=$installBASE/$gperftoolsPACKAGE
# Nothing to build
if _foamIsNone $gperftoolsPACKAGE
then
echo "Using gperftools-none (skip ThirdParty build of gperftools)"
exit 0
elif _foamIsSystem $gperftoolsPACKAGE
then
echo "Using gperftools-system (skip ThirdParty build of gperftools)"
exit 0
fi
#------------------------------------------------------------------------------
# #
# Build gperftools # Build gperftools
# #
GPERFTOOLS_SOURCE_DIR=$sourceBASE/$gperftoolsPACKAGE
GPERFTOOLS_ARCH_PATH=$installBASE/$gperftoolsPACKAGE
echo "---------------" echo "---------------"
if [ -d "$prefixDIR" ] if [ -d "$GPERFTOOLS_ARCH_PATH" ]
then then
echo "Already built: $gperftoolsPACKAGE" echo "Already built: $gperftoolsPACKAGE"
else else
echo "Starting build: $gperftoolsPACKAGE" echo "Starting build: $gperftoolsPACKAGE"
( (
sourceDIR=$WM_THIRD_PARTY_DIR/$gperftoolsPACKAGE buildDIR=$buildBASE/$gperftoolsPACKAGE
buildDIR=$buildBASE/$gperftoolsPACKAGE
cd $sourceDIR || exit 1 cd $GPERFTOOLS_SOURCE_DIR || exit 1
make distclean 2>/dev/null
rm -rf $buildDIR make distclean 2>/dev/null
mkdir -p $buildDIR
cd $buildDIR
# remove old junk rm -rf $GPERFTOOLS_ARCH_PATH
rm -rf $prefixDIR rm -rf $buildDIR
mkdir -p $buildDIR
cd $buildDIR
$sourceDIR/configure \ set -x
--prefix=$prefixDIR \ $GPERFTOOLS_SOURCE_DIR/configure \
&& make -j $WM_NCOMPPROCS \ --prefix=$GPERFTOOLS_ARCH_PATH \
&& make install \ && make -j $WM_NCOMPPROCS \
&& echo "Built: $gperftoolsPACKAGE" \ && make install \
) || { && echo "Built: $gperftoolsPACKAGE" \
echo "Error building: $gperftoolsPACKAGE" ) || {
exit 1 echo "Error building: $gperftoolsPACKAGE"
} exit 1
}
fi fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

120
makeLLVM
View File

@ -51,8 +51,8 @@
# mv cfe-3.8.0.src llvm-3.8.0/tools/clang # mv cfe-3.8.0.src llvm-3.8.0/tools/clang
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# get default llvm/clang version # Get default llvm/clang version
WM_COMPILER_TYPE="ThirdParty" # ensure we get the correct compiler settings WM_COMPILER_TYPE=ThirdParty # ensure we get the correct compiler settings
WM_COMPILER=Clang # force values for 'clang' WM_COMPILER=Clang # force values for 'clang'
. $WM_PROJECT_DIR/etc/config.sh/functions . $WM_PROJECT_DIR/etc/config.sh/functions
@ -70,15 +70,15 @@ 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: $Script [OPTION] [llvm-VERSION] usage: ${0##*/} [OPTION] [llvm-VERSION]
options: options:
-cmake PATH with cmake from the path given
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
-help -help
* build llvm/clang * build llvm/clang
@ -87,16 +87,27 @@ options:
USAGE USAGE
exit 1 exit 1
} }
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Ensure CMake gets the correct C/C++ compiler
[ -n "$WM_CC" ] && export CC="$WM_CCX"
[ -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
;; ;;
-gcc)
export CC=gcc # use gcc/g++
export CXX=g++
;;
-cmake)
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
CMAKE_PATH="${2%%/}"
shift
;;
llvm-[0-9]* | llvm-svn*) llvm-[0-9]* | llvm-svn*)
llvmPACKAGE="${1%%/}" llvmPACKAGE="${1%%/}"
;; ;;
@ -110,20 +121,19 @@ done
[ -n "$llvmPACKAGE" ] || die "The llvm-VERSION was not specified" [ -n "$llvmPACKAGE" ] || die "The llvm-VERSION was not specified"
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# build/install without compiler name # Build/install locations without a compiler name
buildBASE=$WM_THIRD_PARTY_DIR/build/$WM_ARCH$WM_COMPILER_ARCH buildBASE=$WM_THIRD_PARTY_DIR/build/$WM_ARCH$WM_COMPILER_ARCH
installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH
LLVM_ARCH_PATH=$installBASE/$llvmPACKAGE # Build LLVM (clang)
# LLVM_SOURCE_DIR : location of the original sources
# LLVM_BINARY_DIR : location of the build
# LLVM_ARCH_PATH : location of the installed program
# - Strip any trailing '.src' from the proper names
# name of source directory LLVM_SOURCE_DIR=$sourceBASE/$llvmPACKAGE
# - may have a llvm/ subdirectory, depending on how the sources were fetched LLVM_BINARY_DIR=$buildBASE/${llvmPACKAGE%%.src}
# LLVM_ARCH_PATH=$installBASE/${llvmPACKAGE%%.src}
sourceDIR=$WM_THIRD_PARTY_DIR/$llvmPACKAGE
if [ -f $sourceDIR/llvm/configure ]
then
sourceDIR=$sourceDIR/llvm
fi
# #
# Build LLVM # Build LLVM
@ -132,31 +142,63 @@ echo "---------------"
if [ -d $LLVM_ARCH_PATH ] if [ -d $LLVM_ARCH_PATH ]
then then
echo "Already built: $llvmPACKAGE" echo "Already built: $llvmPACKAGE"
else elif [ -z "$CMAKE_PATH" ] && $LLVM_SOURCE_DIR/configure -help >/dev/null 2>&1
echo "Starting build: $llvmPACKAGE" then
# configure can be used prior to 3.9.0
# but use cmake if someone explicitly mentioned -cmake on the command-line
echo "Starting build: $llvmPACKAGE (using configure)"
echo echo
( (
cd $sourceDIR || exit 1 cd $LLVM_SOURCE_DIR || exit 1
make distclean 2>/dev/null make distclean 2>/dev/null
buildDIR=$buildBASE/$llvmPACKAGE rm -rf $LLVM_BINARY_DIR
rm -rf $buildDIR mkdir -p $LLVM_BINARY_DIR
mkdir -p $buildDIR cd $LLVM_BINARY_DIR
cd $buildDIR
set -x
$LLVM_SOURCE_DIR/configure \
--prefix=$LLVM_ARCH_PATH \
--with-gcc-toolchain=$(which gcc | sed s%/bin/gcc%%) \
--enable-optimized \
--enable-shared \
&& make -j $WM_NCOMPPROCS \
&& make install \
&& echo "Built: $llvmPACKAGE"
) || {
echo "Error building: $llvmPACKAGE"
exit 1
}
else
# CMake used with 3.9.0 and later
echo "Starting build: $llvmPACKAGE (using cmake)"
echo
(
cd $LLVM_SOURCE_DIR || exit 1
rm -rf $LLVM_BINARY_DIR
mkdir -p $LLVM_BINARY_DIR
cd $LLVM_BINARY_DIR
cmake=$(findCMake)
set -x
$cmake \
-DCMAKE_INSTALL_PREFIX=$LLVM_ARCH_PATH \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS:BOOL=ON \
$LLVM_SOURCE_DIR \
&& make -j $WM_NCOMPPROCS \
&& make install \
&& echo "Built: $llvmPACKAGE"
) || {
echo "Error building: $llvmPACKAGE"
exit 1
}
set -x
$sourceDIR/configure \
--prefix=$LLVM_ARCH_PATH \
--with-gcc-toolchain=$(which gcc | sed s%/bin/gcc%%) \
--enable-optimized \
--enable-shared \
&& make -j $WM_NCOMPPROCS \
&& make install \
&& echo "Built: $llvmPACKAGE"
) || {
echo "Error building: $llvmPACKAGE"
exit 1
}
fi fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -29,14 +29,17 @@
# Build script for Mesa # Build script for Mesa
# #
# Note # Note
# Building with mesa-12.0.1 failed to install an "osmesa.h" file, # Building with mesa-12.x.x fails to create an include/GL directory and
# which renders it useless for off-screen VTK. # an "osmesa.h" file. Both make it fairly useless for off-screen VTK.
#
# Building with mesa-11.x is fine and mesa-13.x also seems to be okay.
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
mesaPACKAGE=mesa-11.2.2 # Special purpose script, no default version.
unset mesaPACKAGE
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# run from third-party directory only # 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"
@ -46,16 +49,14 @@ 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: $Script [OPTION] [mesa-VERSION] usage: ${0##*/} [OPTION] mesa-VERSION
options: options:
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX -gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
-help -help
* build Mesa with * build Mesa with
@ -65,8 +66,7 @@ USAGE
exit 1 exit 1
} }
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Ensure configure gets the correct C/C++ compiler
# ensure configure gets the correct C/C++ compiler
[ -n "$WM_CC" ] && export CC="$WM_CC" [ -n "$WM_CC" ] && export CC="$WM_CC"
[ -n "$WM_CXX" ] && export CXX="$WM_CXX" [ -n "$WM_CXX" ] && export CXX="$WM_CXX"
@ -77,7 +77,7 @@ then
thirdPartyClang=true thirdPartyClang=true
fi fi
# parse options # Parse options
while [ "$#" -gt 0 ] while [ "$#" -gt 0 ]
do do
case "$1" in case "$1" in
@ -101,21 +101,19 @@ done
[ -n "$mesaPACKAGE" ] || die "The mesa-VERSION was not specified" [ -n "$mesaPACKAGE" ] || die "The mesa-VERSION was not specified"
# nothing to build # Nothing to build
if _foamIsNone "$mesaPACKAGE" if _foamIsNone "$mesaPACKAGE"
then then
echo "Using mesa-none (skip ThirdParty build of MESA)" echo "Using mesa-none (skip ThirdParty build of MESA)"
exit 0 exit 0
fi elif _foamIsSystem "$mesaPACKAGE"
if _foamIsSystem "$mesaPACKAGE"
then then
echo "Using mesa-system (skip ThirdParty build of MESA)" echo "Using mesa-system (skip ThirdParty build of MESA)"
exit 0 exit 0
fi fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# locate third-party clang as required # Locate third-party clang as required
if [ "$thirdPartyClang" = true ] if [ "$thirdPartyClang" = true ]
then then
thirdPartyClang=$(command -v clang) || { thirdPartyClang=$(command -v clang) || {
@ -139,9 +137,10 @@ fi
# - MESA itself will normally build into 'lib64'. # - MESA itself will normally build into 'lib64'.
# #
# MESA_SOURCE_DIR : location of the original sources # MESA_SOURCE_DIR : location of the original sources
# MESA_ARCH_DIR : installation directory
MESA_SOURCE_DIR=$sourceBASE/$mesaPACKAGE
MESA_ARCH_PATH=$installBASE/$mesaPACKAGE MESA_ARCH_PATH=$installBASE/$mesaPACKAGE
MESA_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$mesaPACKAGE
( (
# configuration options: # configuration options:

View File

@ -26,17 +26,21 @@
# makeParaView # makeParaView
# #
# Description # Description
# Make and install paraview 4 or 5 # Make and install ParaView 4 or 5.
# - place the paraview source under $WM_THIRD_PARTY_DIR/ParaView-VERSION # The ParaView sources should be located under one of these locations:
# (note capitalisation) # - $WM_THIRD_PARTY_DIR/ParaView-VERSION
# - $WM_THIRD_PARTY_DIR/ParaView-vVERSION
#
# Note the capitalization of ParaView in the directory names.
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Get ParaView_DIR location from OpenFOAM config file # Get ParaView_VERSION location from OpenFOAM config file
. $WM_PROJECT_DIR/etc/config.sh/functions . $WM_PROJECT_DIR/etc/config.sh/functions
unset -f _foamAddPath _foamAddLib # get settings only
unset ParaView_VERSION # purge current values
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/paraview) _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##*-} : ${ParaView_VERSION##*-}
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
@ -90,7 +94,6 @@ withGL2=auto
# #
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
Script=${0##*/} Script=${0##*/}
usage() { usage() {
: ${ParaView_VERSION:=none} # some dummy value for usage information : ${ParaView_VERSION:=none} # some dummy value for usage information
exec 1>&2 exec 1>&2
@ -106,7 +109,7 @@ options:
-mpi=NPROCS with mpi and max 'NPROCS' processes. NPROCS=0 for no -mpi=NPROCS with mpi and max 'NPROCS' processes. NPROCS=0 for no
upper-limit on processes. 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 cmake from the path given
-qmake PATH with the Qt version corresponding to the qmake path given -qmake PATH with the Qt version corresponding to the qmake path given
-qt with extra Qt gui support (if not already enabled) -qt with extra Qt gui support (if not already enabled)
-qt-VER with Qt version corresponding to -qt-VER with Qt version corresponding to
@ -151,15 +154,13 @@ Or change the \$WM_PROJECT_DIR/etc/config.sh/paraview settings.
USAGE USAGE
exit 1 exit 1
} }
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Ensure CMake gets the correct C/C++ compiler
# ensure CMake gets the correct C/C++ compiler
[ -n "$WM_CC" ] && export CC="$WM_CC" [ -n "$WM_CC" ] && export CC="$WM_CC"
[ -n "$WM_CXX" ] && export CXX="$WM_CXX" [ -n "$WM_CXX" ] && export CXX="$WM_CXX"
# #
# add options based on script name: # Add options based on script name:
# #
case "$Script" in *-mesa*) withMESA=true;; esac case "$Script" in *-mesa*) withMESA=true;; esac
case "$Script" in *-mpi*) withMPI=true;; esac case "$Script" in *-mpi*) withMPI=true;; esac
@ -170,13 +171,13 @@ case "$Script" in *-qt*) withQT=true;; esac
setParaViewVersion ${ParaView_VERSION:-none} setParaViewVersion ${ParaView_VERSION:-none}
# #
# various building stages # Various building stages
# #
unset runPATCH runCONFIG runMAKE runINSTALL unset runPATCH runCONFIG runMAKE runINSTALL
runDEFAULT=true runDEFAULT=true
buildType=Release buildType=Release
# parse options # Parse options
while [ "$#" -gt 0 ] while [ "$#" -gt 0 ]
do do
case "$1" in case "$1" in
@ -380,10 +381,9 @@ Features selected
--------------------- ---------------------
Version information Version information
qt ${QtVersion:-none} qt ${QtVersion:-none}
version ${ParaView_VERSION:-unknown} version ${ParaView_VERSION:-unknown} $(checkVersion)
major ${ParaView_MAJOR:-unknown} major ${ParaView_MAJOR:-unknown}
build ${buildType:-Release} build ${buildType:-Release}
$(checkVersion)
--------------------- ---------------------
SUMMARY SUMMARY

View File

@ -4,6 +4,7 @@
# - off-screen mesa # - off-screen mesa
mesa=mesa-11.2.2 mesa=mesa-11.2.2
# mesa=mesa-13.0.2
./makeParaView \ ./makeParaView \
-mpi=0 \ -mpi=0 \

View File

@ -1,341 +0,0 @@
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
#------------------------------------------------------------------------------
# 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
# makeParaView3
#
# Description
# Make and install paraview for version 3.14.1 and higher
# - place the paraview source under $WM_THIRD_PARTY_DIR/ParaView-VERSION
# (note capitalisation)
#
#------------------------------------------------------------------------------
# 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
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/ParaView3Functions
#------------------------------------------------------------------------------
#
# USER OPTIONS:
# ~~~~~~~~~~~~~
# MPI support:
withMPI=false
MPI_MAX_PROCS=32
# Python support:
# note: script will try to determine the appropriate python library.
# If it fails, specify the path using the PYTHON_LIBRARY variable
withPYTHON=false
PYTHON_LIBRARY=""
# PYTHON_LIBRARY="/usr/lib$WM_COMPILER_LIB_ARCH/libpython2.6.so.1.0"
# MESA graphics support:
withMESA=false
MESA_INCLUDE="/usr/include/GL"
MESA_LIBRARY="/usr/lib$WM_COMPILER_LIB_ARCH/libOSMesa.so"
# extra QT gui support (useful for some third party apps)
withQT=true
# Set the path to the Qt-4.5 (or later) qmake if the system Qt is older
QMAKE_PATH=""
# Set the path to cmake
CMAKE_PATH=""
#
# NO FURTHER EDITING BELOW THIS LINE
#
#-----------------------------------------------------------------------------
Script=${0##*/}
usage() {
: ${ParaView_VERSION:=none} # some dummy value for usage information
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
cat<<USAGE
usage: $Script [OPTION] [paraview-VERSION] [CMAKE-OPTION]
options:
-rebuild for repeated builds (-make -install) *use with caution*
-mesa with mesa (if not already enabled)
-mpi with mpi (if not already enabled)
-python with python (if not already enabled)
-cmake PATH with the cmake version corresponding to the cmake 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-VER with Qt version corresponding to
\$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/qt-VER/bin/qmake
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
-verbose verbose output in Makefiles
-version VER specify an alternative version (current value: $ParaView_VERSION)
-major VER specify an alternative major version for special builds
-mesa-include DIR location of mesa headers (current value: ${MESA_INCLUDE:-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})
-help
The -no-FEATURE option can be used to forcibly disable these features:
mesa mpi python qt
CMake options start with a capital letter and contain an '='.
For example,
$Script BUILD_TESTING=ON PARAVIEW_GENERATE_PROXY_DOCUMENTATION=OFF
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 paraview-$ParaView_VERSION located under
\$WM_THIRD_PARTY_DIR/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
exit 1
}
#------------------------------------------------------------------------------
# ensure CMake gets the correct C/C++ compiler
[ -n "$WM_CC" ] && export CC="$WM_CC"
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
#
# add options based on script name:
#
case "$Script" in *-mesa*) withMESA=true;; esac
case "$Script" in *-mpi*) withMPI=true;; esac
case "$Script" in *-python*) withPYTHON=true;; esac
case "$Script" in *-qt*) withQT=true;; esac
# Set initial ParaView_MAJOR based on current value of ParaView_VERSION
setParaViewVersion ${ParaView_VERSION:-none}
#
# various building stages
#
unset runCONFIG runMAKE runINSTALL
runDEFAULT=true
# parse options
while [ "$#" -gt 0 ]
do
case "$1" in
-h | -help)
usage
;;
[0-9]* | paraview-[0-9]* | ParaView-[0-9]*) # paraview version
setParaViewVersion "${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
;;
-mesa)
withMESA=true
;;
-no-mesa)
withMESA=false
;;
-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
;;
-no-mpi)
withMPI=false
;;
-python)
withPYTHON=true
;;
-no-python)
withPYTHON=false
;;
-python-lib)
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
PYTHON_LIBRARY="$2"
shift
;;
-cmake)
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
CMAKE_PATH=$2
shift
;;
-qmake)
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
QMAKE_PATH=$2
shift
;;
-qt)
withQT=true
;;
-no-qt)
withQT=false
;;
-qt-[1-9]*)
QMAKE_PATH="$installBASE/${1##-}"
;;
-verbose)
withVERBOSE=true
;;
-version)
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
setParaViewVersion "${2%%/}"
shift
;;
-major)
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
export ParaView_MAJOR="$2"
shift
;;
*)
die "unknown option/argument: '$1'"
;;
esac
shift
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 ]
then
: ${runCONFIG:=true}
: ${runMAKE:=true}
: ${runINSTALL:=true}
fi
# Set configure options
#~~~~~~~~~~~~~~~~~~~~~~
addVerbosity # verbose makefiles
addMpiSupport # set MPI-specific options
addPythonSupport # set Python-specific options
addMesaSupport # set MESA-specific options
addQtSupport # add extra Qt support
setParaViewDirs # where things are or should be put
# Build and install
# ~~~~~~~~~~~~~~~~~
cat<<SUMMARY
Build stages selected
---------------------
-config ${runCONFIG:-false}
-make ${runMAKE:-false}
-install ${runINSTALL:-false}
---------------------
Features selected
mesa ${withMESA:-false}
mpi ${withMPI:-false}
python ${withPYTHON:-false}
qt ${withQT:-false}
---------------------
Version information
qt ${QtVersion:-none}
version ${ParaView_VERSION:-unknown}
major ${ParaView_MAJOR:-unknown}
$(checkVersion)
---------------------
SUMMARY
[ "$runCONFIG" = true ] && configParaView
[ "$runMAKE" = true ] && makeParaView
[ "$runINSTALL" = true ] && installParaView
echo
echo Done
#------------------------------------------------------------------------------

100
makeQt
View File

@ -43,7 +43,6 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
. etc/tools/ThirdPartyFunctions . etc/tools/ThirdPartyFunctions
. etc/tools/QtFunctions . etc/tools/QtFunctions
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
usage() { usage() {
exec 1>&2 exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done while [ "$#" -ge 1 ]; do echo "$1"; shift; done
@ -60,13 +59,13 @@ USAGE
exit 1 exit 1
} }
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# export WM settings in a form that GNU configure recognizes # Export WM settings in a form that GNU configure recognizes
[ -n "$WM_CC" ] && export CC="$WM_CC" [ -n "$WM_CC" ] && export CC="$WM_CC"
[ -n "$WM_CXX" ] && export CXX="$WM_CXX" [ -n "$WM_CXX" ] && export CXX="$WM_CXX"
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS" [ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS" [ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
# parse options # Parse options
while [ "$#" -gt 0 ] while [ "$#" -gt 0 ]
do do
case "$1" in case "$1" in
@ -105,8 +104,8 @@ fi
# #
# Build QT # Build QT
QT_SOURCE_DIR=$sourceBASE/$qtPACKAGE
QT_ARCH_PATH=$installBASE/qt-$qtVERSION QT_ARCH_PATH=$installBASE/qt-$qtVERSION
QT_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$qtPACKAGE
echo echo
echo ======================================== echo ========================================
@ -117,63 +116,62 @@ then
echo "Already built: Qt-$qtVERSION" echo "Already built: Qt-$qtVERSION"
else else
echo "Starting build: Qt-$qtVERSION" echo "Starting build: Qt-$qtVERSION"
( (
# Configuration options: # Configuration options:
unset configOpt unset configOpt
configOpt="$configOpt -nomake examples" configOpt="$configOpt -nomake examples"
case "$qtVERSION" in case "$qtVERSION" in
4*) # QT-4 4*) # QT-4
# Without demos. # Without demos.
configOpt="$configOpt -nomake demos" configOpt="$configOpt -nomake demos"
# Without old qt3 transition code # Without old qt3 transition code
configOpt="$configOpt -no-qt3support" configOpt="$configOpt -no-qt3support"
# Without WebKit - uses std:tr1 and does not compile with c++11 # Without WebKit - uses std:tr1 and does not compile with c++11
# Fortunately WebKit is now optional for ParaView # Fortunately WebKit is now optional for ParaView
configOpt="$configOpt -no-webkit" configOpt="$configOpt -no-webkit"
;; ;;
*) # QT-5 *) # QT-5
# Avoid too many X11 system dependencies. # Avoid too many X11 system dependencies.
configOpt="$configOpt -qt-xcb" configOpt="$configOpt -qt-xcb"
;; ;;
esac esac
# end of configuration options # end of configuration options
# ---------------------------- # ----------------------------
buildDIR=$buildBASE/$qtPACKAGE buildDIR=$buildBASE/$qtPACKAGE
cd $QT_SOURCE_DIR || exit 1 cd $QT_SOURCE_DIR || exit 1
[ -e Makefile ] && make distclean 2>/dev/null [ -e Makefile ] && make distclean 2>/dev/null
# Remove any existing build folder and recreate # Remove any existing build folder and recreate
rm -rf $QT_ARCH_DIR rm -rf $QT_ARCH_DIR
rm -rf $buildDIR 2>/dev/null rm -rf $buildDIR 2>/dev/null
mkdir -p $buildDIR mkdir -p $buildDIR
# Remove any remnants from a previous shadow build # Remove any remnants from a previous shadow build
rm -f "$QT_SOURCE_DIR/.qmake.cache" 2>/dev/null rm -f "$QT_SOURCE_DIR/.qmake.cache" 2>/dev/null
rm -f "$QT_SOURCE_DIR/src/corelib/global/qconfig.h" 2>/dev/null rm -f "$QT_SOURCE_DIR/src/corelib/global/qconfig.h" 2>/dev/null
rm -f "$QT_SOURCE_DIR/src/corelib/global/qconfig.cpp" 2>/dev/null rm -f "$QT_SOURCE_DIR/src/corelib/global/qconfig.cpp" 2>/dev/null
cd $buildDIR || exit 1 cd $buildDIR || exit 1
# Compile as opensource, accepting LGPL conditions (yes) # Compile as opensource, accepting LGPL conditions (yes)
echo yes | $QT_SOURCE_DIR/configure \ echo yes | $QT_SOURCE_DIR/configure \
-prefix $QT_ARCH_PATH \ -prefix $QT_ARCH_PATH \
-opensource \ -opensource \
$configOpt \ $configOpt \
&& time make -j $WM_NCOMPPROCS \ && time make -j $WM_NCOMPPROCS \
&& make install \ && make install \
&& echo "Built: Qt-$qtVERSION" \ && echo "Built: Qt-$qtVERSION" \
&& finalizeQt && finalizeQt
) || { ) || {
echo "Error building: Qt-$qtVERSION" echo "Error building: Qt-$qtVERSION"
exit 1 exit 1
} }
fi fi
# ----------------------------------------------------------------- end-of-file # ----------------------------------------------------------------- end-of-file

206
makeTecio Executable file
View File

@ -0,0 +1,206 @@
#!/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
# makeTecio
#
# Description
# Build Tecplot library
#
#------------------------------------------------------------------------------
# Get boost version (headers only)
. $WM_PROJECT_DIR/etc/config.sh/functions
unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL)
boostPACKAGE=${boost_version:-boost-system}
tecioPACKAGE=tecio
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] [boost-VERSION] [tecio-VERSION]
options:
-cmake PATH With cmake from the path given
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
-help
* Compile the proprietary libtecio library
$tecioPACKAGE
with $boostPACKAGE
USAGE
exit 1
}
#------------------------------------------------------------------------------
# Ensure CMake gets the correct C/C++ compiler
[ -n "$WM_CC" ] && export CC="$WM_CCX"
[ -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++
;;
-cmake)
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
CMAKE_PATH="${2%%/}"
shift
;;
boost-[0-9]* | boost_[0-9]* | boost-system )
boostPACKAGE="${1%%/}"
;;
tecio*)
tecioPACKAGE="${1%%/}"
;;
*)
die "unknown option/argument: '$1'"
;;
esac
shift
done
# assert: directory must be available
[ -d "$tecioPACKAGE" ] || die "missing source directory '$tecioPACKAGE'"
#------------------------------------------------------------------------------
#
# Get Boost information
# - only headers are required
: ${BOOST_ARCH_PATH:=$installBASE/$boostPACKAGE} # Fallback
boostInc="$BOOST_ARCH_PATH/include"
if _foamIsSystem $boostPACKAGE
then
echo "Using boost-system"
# Tagged as 'system' but could actually point to a central location
[ -d "$BOOST_ARCH_PATH/include" ] || {
boostInc="/usr/include"
}
elif [ -f "$boostInc/boost/version.hpp" ]
then
echo "Using $boostPACKAGE"
fi
# Build TECIO library
#
# TECIO_SOURCE_DIR : location of the original sources
# TECIO_BINARY_DIR : location of the build
# TECIO_ARCH_PATH : location of the installed program
TECIO_SOURCE_DIR=$sourceBASE/$tecioPACKAGE/teciosrc
TECIO_BINARY_DIR=$buildBASE/$tecioPACKAGE
TECIO_ARCH_PATH=$installBASE/$tecioPACKAGE
if [ -d "$TECIO_SOURCE_DIR" ]
then
(
# Remove any existing build folder and recreate
if [ -d $TECIO_BINARY_DIR ]
then
echo "removing old build directory"
echo " $TECIO_BINARY_DIR"
rm -rf $TECIO_BINARY_DIR
fi
mkdir -p $TECIO_BINARY_DIR
rm -rf $TECIO_ARCH_PATH
unset configBoost
echo "----"
echo "Configuring $tecioPACKAGE with boost $BOOST_VERSION"
echo " Source : $TECIO_SOURCE_DIR"
echo " Build : $TECIO_BINARY_DIR"
echo " Target : $TECIO_ARCH_PATH"
if [ -d "$BOOST_ARCH_PATH" ]
then
echo " Boost : ThirdParty (${BOOST_ARCH_PATH##*/})"
else
echo " Boost : system"
fi
cmake=$(findCMake)
echo "----"
set -x
cd $TECIO_BINARY_DIR && $cmake \
-DCMAKE_INSTALL_PREFIX=$TECIO_ARCH_PATH \
-DCMAKE_BINARY_TYPE=Release \
-DBoost_INCLUDE_DIR=$boostInc \
$TECIO_SOURCE_DIR \
&& make -j $WM_NCOMPPROCS \
&& { \
# Tecio doesn't offer to install, but fortunately only a few files,
# so just install in a single directory
mkdir -p $TECIO_ARCH_PATH 2>/dev/null
/bin/cp -pv \
$TECIO_BINARY_DIR/libtecio.a \
$TECIO_SOURCE_DIR/TECIO.h \
$TECIO_SOURCE_DIR/tecio_Exports.h \
$TECIO_ARCH_PATH
chmod 0644 $TECIO_ARCH_PATH/*
} \
&& echo "Built: $tecioPACKAGE"
) || {
echo "Error building: $tecioPACKAGE"
}
fi
#------------------------------------------------------------------------------

22
makeVTK
View File

@ -26,16 +26,18 @@
# makeVTK # makeVTK
# #
# Description # Description
# Make and install VTK # Make and install VTK.
# - place the VTK source under $WM_THIRD_PARTY_DIR/VTK-VERSION # The VTK sources should be located under one of these locations:
# - $WM_THIRD_PARTY_DIR/ParaView-VERSION
# - $WM_THIRD_PARTY_DIR/ParaView-vVERSION
# #
# To use the VTK source from the ParaView source tree, simply make an # To use the VTK source from the ParaView source tree, simply make an
# appropriate link first. For example, # appropriate link first. For example,
# #
# ln -s ParaView-5.1.0/VTK VTK-7.1.0 # (cd $WM_THIRD_PARTY_DIR && ln -s ParaView-v5.2.0/VTK VTK-7.1.0)
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# run from third-party directory only # 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"
@ -68,13 +70,11 @@ CMAKE_PATH=""
# Default to auto-config based on VTK version # Default to auto-config based on VTK version
withGL2=auto withGL2=auto
# #
# NO FURTHER EDITING BELOW THIS LINE # NO FURTHER EDITING BELOW THIS LINE
# #
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
Script=${0##*/} 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
@ -89,7 +89,7 @@ options:
-mpi=NPROCS with mpi and max 'NPROCS' processes. NPROCS=0 for no -mpi=NPROCS with mpi and max 'NPROCS' processes. NPROCS=0 for no
upper-limit on processes. upper-limit on processes.
-osmesa with off-screen mesa only -osmesa with off-screen mesa only
-cmake PATH with the cmake version corresponding to the cmake path given -cmake PATH with cmake from the path given
-gcc force g++ instead of the value from \$WM_CXX -gcc force g++ instead of the value from \$WM_CXX
-verbose verbose output in Makefiles -verbose verbose output in Makefiles
-version VER specify an alternative version (current value: $VTK_VERSION) -version VER specify an alternative version (current value: $VTK_VERSION)
@ -120,22 +120,20 @@ For finer control, the build stages can be selected or deselected individually:
USAGE USAGE
exit 1 exit 1
} }
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Ensure CMake gets the correct C/C++ compiler
# ensure CMake gets the correct C/C++ compiler
[ -n "$WM_CC" ] && export CC="$WM_CC" [ -n "$WM_CC" ] && export CC="$WM_CC"
[ -n "$WM_CXX" ] && export CXX="$WM_CXX" [ -n "$WM_CXX" ] && export CXX="$WM_CXX"
# #
# various building stages # Various building stages
# #
unset runPATCH runCONFIG runMAKE runINSTALL unset runPATCH runCONFIG runMAKE runINSTALL
runDEFAULT=true runDEFAULT=true
buildType=Release buildType=Release
withOSMESA=false withOSMESA=false
# parse options # Parse options
while [ "$#" -gt 0 ] while [ "$#" -gt 0 ]
do do
case "$1" in case "$1" in

View File

@ -2,8 +2,9 @@
# An example for building particular combinations of VTK with # An example for building particular combinations of VTK with
# - off-screen mesa # - off-screen mesa
vtk=vtk-7.1.0 vtk=VTK-7.1.0
mesa=mesa-11.2.2 # mesa=mesa-11.2.2
mesa=mesa-13.0.1
./makeVTK \ ./makeVTK \
$vtk \ $vtk \

View File

@ -85,7 +85,8 @@ do
if [ -n "$min" ] if [ -n "$min" ]
then then
echo "${min%.0}" $dir # With trailing ".0 removed # Remove trailing ".0" from version
echo "${min%.0}" "${dir#sources/}"
fi fi
done \ done \

38
sources.txt Normal file
View File

@ -0,0 +1,38 @@
Third-Party Sources
===================
OpenFOAM+ v1612
---------------
CGAL-4.9
ParaView-5.0.1
boost_1_62_0
fftw-3.3.5
openmpi-1.10.4
scotch_6.0.3
OpenFOAM+ v1606
---------------
CGAL-4.8
ParaView-5.0.1
boost_1_61_0
fftw-3.3.4
openmpi-1.10.2
scotch_6.0.3
OpenFOAM+ v3.0
---------------
CGAL-4.7
ParaView-4.4.0
openmpi-1.10.0
scotch_6.0.3
OpenFOAM+ 2.4
---------------
CGAL-4.6
ParaView-4.1.0
cmake-2.8.12.1
openmpi-1.8.5
scotch_6.0.3