ENH: improve third-party make with central installations

- initial attempt for building CGAL as headers-only, and without
  gmp/mpfr
This commit is contained in:
mark
2016-11-27 15:57:51 +01:00
parent 0f5e1d6732
commit cc2161856b
17 changed files with 265 additions and 215 deletions

View File

@ -295,7 +295,7 @@ GNU *configure* can only be used prior to clang version 3.9.
|-----------------------|------------------------|
| [CMake][page cmake] | [download][link cmake] |
| [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] |
| [ADF/CGNS][page CGNS], ccm | [link ccmio][link ccmio] |
| [tecio][page tecio] | [link tecio][link tecio] |
@ -368,8 +368,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
[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
[newer CGAL]: https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.9/CGAL-4.9.tar.xz
[link 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/
[link FFTW]: http://www.fftw.org/fftw-3.3.5.tar.gz

View File

@ -151,7 +151,7 @@ NOT_FOUND
fi
# 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 "${foundExe:-cmake}"
}

View File

@ -29,7 +29,6 @@
# Build script for ADIOS
#
#------------------------------------------------------------------------------
# Get version info
. $WM_PROJECT_DIR/etc/config.sh/functions
unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only
@ -38,7 +37,7 @@ _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" || {
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
echo " The environment variables are inconsistent with the installation."
@ -47,7 +46,6 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
}
. etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------
usage() {
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
@ -64,15 +62,14 @@ options:
USAGE
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_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 ]
do
case "$1" in
@ -109,6 +106,8 @@ fi
#------------------------------------------------------------------------------
#
# Build ADIOS
# ADIOS_ARCH_PATH : installation directory
# ADIOS_SOURCE_DIR : location of the original sources
ADIOS_ARCH_PATH=$installBASE/$adiosPACKAGE
ADIOS_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$adiosPACKAGE
@ -186,9 +185,10 @@ else
CXX=mpicxx
fi
# installs into lib64/
# 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 \
@ -214,7 +214,9 @@ else
{
# We don't need/use XML things
\rm -f adios_lint
} && $ADIOS_ARCH_PATH/bin/adios_config -m
$ADIOS_ARCH_PATH/bin/adios_config -m 2>/dev/null || \
echo "Warning: Problems running adios_config"
}
) || {
echo "Error building: $adiosPACKAGE"
}

View File

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

112
makeCGAL
View File

@ -35,13 +35,14 @@
# makeCGAL boost-system gmp-system
#
#------------------------------------------------------------------------------
# Get CGAL, boost and gmp/mpfr versions
. $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/CGAL)
boostPACKAGE=${boost_version:-boost-system}
gmpPACKAGE=${gmp_version:-gmp-system}
@ -59,7 +60,6 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
. etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------
Script="${0##*/}"
usage() {
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
@ -69,6 +69,7 @@ usage: $Script [OPTION] [CGAL-VERSION] [boost-VERSION] [gmp-VERSION] [mpfr-VERSI
options:
-cmake PATH with cmake from the path given
-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
-help
@ -83,6 +84,8 @@ To override this behaviour (and use the system boost and/or gmp/mpfr),
simply specify a 'system' version. For example,
$Script boost-system gmp-system
Use gmp-none to disable use of gmp/mpfr (eg, not available)
USAGE
exit 1
}
@ -91,6 +94,8 @@ USAGE
[ -n "$WM_CC" ] && export CC="$WM_CCX"
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
unset optHeadersOnly
# Parse options
while [ "$#" -gt 0 ]
do
@ -114,18 +119,24 @@ do
gmpPACKAGE="gmp-system"
mpfrPACKAGE="mpfr-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%%/}"
;;
mpfr-[2-9]* | mpfr-system)
mpfr-[2-9]* | mpfr-system | mpfr-none)
mpfrPACKAGE="${1%%/}"
;;
CGAL-[0-9]*)
cgalPACKAGE="${1%%/}"
unset CGAL_ARCH_PATH # avoid inconsistency
;;
boost-[0-9]* | boost_[0-9]* | boost-system )
boostPACKAGE="${1%%/}"
unset BOOST_ARCH_PATH # avoid inconsistency
;;
*)
die "unknown option/argument: '$1'"
@ -136,13 +147,13 @@ done
[ -n "$cgalPACKAGE" ] || die "The cgal-VERSION was not specified"
# nothing to build
if _foamIsNone "$boostPACKAGE"
# Nothing to build
if _foamIsNone $boostPACKAGE
then
echo "Using boost-none (skip ThirdParty build of BOOST/CGAL)"
exit 0
fi
if _foamIsNone "$cgalPACKAGE"
if _foamIsNone $cgalPACKAGE
then
echo "Using cgal-none (skip ThirdParty build of CGAL)"
exit 0
@ -156,21 +167,26 @@ fi
# - 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_ARCH_PATH=$installBASE/$boostPACKAGE
BOOST_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$boostPACKAGE
: ${BOOST_ARCH_PATH:=$installBASE/$boostPACKAGE} # Fallback
boostInc="$BOOST_ARCH_PATH/include"
boostLib="$BOOST_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
if _foamIsSystem $BOOST_ARCH_PATH
if _foamIsSystem $boostPACKAGE
then
echo "Using boost-system (skip ThirdParty build of BOOST)"
boostInc="/usr/include"
boostLib="/usr/lib$WM_COMPILER_LIB_ARCH"
elif [ -f "$boostInc/boost/version.hpp" -a -d "$boostLib" ]
# Tagged as 'system' but could actually point to a central location
[ -d "$BOOST_ARCH_PATH/include" ] || {
boostInc="/usr/include"
boostLib="/usr/lib$WM_COMPILER_LIB_ARCH"
}
elif [ -f "$boostInc/boost/version.hpp" ]
then
echo "Using $boostPACKAGE"
else
@ -197,7 +213,7 @@ else
fi
# nothing left to build
if _foamIsSystem "$cgalPACKAGE"
if _foamIsSystem $cgalPACKAGE
then
echo "Using cgal-system (skip ThirdParty build of CGAL)"
exit 0
@ -239,20 +255,30 @@ SUMMARY
#
# CGAL_SOURCE_DIR : location of the original sources
# 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_BINARY_DIR=$buildBASE/$cgalPACKAGE
CGAL_ARCH_PATH=$installBASE/$cgalPACKAGE
CGAL_DIR=$CGAL_ARCH_PATH
: ${CGAL_ARCH_PATH:=$installBASE/$cgalPACKAGE} # Fallback
#
# gmp/mpfr installed without compiler name
# gmp/mpfr are installed without compiler name
installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH
GMP_ARCH_PATH=$installBASE/$gmpPACKAGE
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
#
@ -274,6 +300,7 @@ 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
}
@ -316,6 +343,7 @@ cgalIsCurrent()
return 0
}
if cgalIsCurrent
then
echo " ${CGAL_ARCH_PATH##*/} build appears to be up-to-date - skipping"
@ -340,10 +368,21 @@ fi
echo "Configuring $cgalPACKAGE with boost $BOOST_VERSION"
echo " Source : $CGAL_SOURCE_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
echo " ThirdParty : boost"
configBoost=$(cat <<CMAKE_OPTIONS
@ -355,16 +394,17 @@ fi
-DBoost_SYSTEM_LIBRARY_RELEASE=$boostLib/libboost_system.so
-DBoost_VERSION=$BOOST_VERSION
CMAKE_OPTIONS
)
else
echo " system : boost"
configBoost=$(cat <<CMAKE_OPTIONS
-DBOOST_LIBRARYDIR=$boostLib
CMAKE_OPTIONS
)
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
echo " ThirdParty : gmp"
configGmp=$(cat <<CMAKE_OPTIONS
@ -376,10 +416,17 @@ CMAKE_OPTIONS
CMAKE_OPTIONS
)
else
echo " system : gmp"
echo " system : gmp (did not find $GMP_ARCH_PATH)"
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
echo " ThirdParty : mpfr"
configMpfr=$(cat <<CMAKE_OPTIONS
@ -389,7 +436,7 @@ CMAKE_OPTIONS
CMAKE_OPTIONS
)
else
echo " system : mpfr"
echo " system : mpfr (did not find $MPFR_ARCH_PATH)"
fi
cmake=$(findCMake)
@ -403,6 +450,7 @@ CMAKE_OPTIONS
-DCGAL_INSTALL_LIB_DIR=lib$WM_COMPILER_LIB_ARCH \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_CGAL_Qt5=OFF \
${optHeadersOnly:+-DCGAL_HEADER_ONLY=TRUE} \
$configBoost $configGmp $configMpfr \
$CGAL_SOURCE_DIR \
&& make -j $WM_NCOMPPROCS \

View File

@ -33,7 +33,7 @@
unset cmakePACKAGE
#------------------------------------------------------------------------------
# run from third-party directory only
# Run from third-party directory only
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
echo " The environment variables are inconsistent with the installation."
@ -42,7 +42,6 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
}
. etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------
usage() {
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
@ -60,12 +59,11 @@ USAGE
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_CXX" ] && export CXX="$WM_CXX"
# parse options
# Parse options
while [ "$#" -gt 0 ]
do
case "$1" in
@ -89,36 +87,38 @@ done
[ -n "$cmakePACKAGE" ] || die "The cmake-VERSION was not specified"
#------------------------------------------------------------------------------
CMAKE_ARCH_PATH=$installBASE/$cmakePACKAGE
#
# Build CMAKE
#
echo "---------------"
# CMAKE_ARCH_PATH : installation directory
# CMAKE_SOURCE_DIR : location of the original sources
CMAKE_ARCH_PATH=$installBASE/$cmakePACKAGE
CMAKE_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$cmakePACKAGE
if [ -d "$CMAKE_ARCH_PATH" -a -r "$CMAKE_ARCH_PATH/bin/cmake" ]
then
echo "Already built: $cmakePACKAGE"
else
echo "Starting build: $cmakePACKAGE"
(
sourceDIR=$WM_THIRD_PARTY_DIR/$cmakePACKAGE
buildDIR=$buildBASE/$cmakePACKAGE
(
buildDIR=$buildBASE/$cmakePACKAGE
cd $sourceDIR || exit 1
make distclean 2>/dev/null
cd $CMAKE_SOURCE_DIR || exit 1
make distclean 2>/dev/null
rm -rf $buildDIR
mkdir -p $buildDIR
cd $buildDIR
rm -rf $buildDIR
mkdir -p $buildDIR
cd $buildDIR
$sourceDIR/bootstrap --prefix=$CMAKE_ARCH_PATH \
&& time make -j $WM_NCOMPPROCS \
&& make install \
&& echo "Built: $cmakePACKAGE"
) || {
echo "Error building: $cmakePACKAGE"
exit 1
}
$CMAKE_SOURCE_DIR/bootstrap \
--prefix=$CMAKE_ARCH_PATH \
&& time make -j $WM_NCOMPPROCS \
&& make install \
&& echo "Built: $cmakePACKAGE"
) || {
echo "Error building: $cmakePACKAGE"
exit 1
}
fi
#------------------------------------------------------------------------------

View File

@ -29,7 +29,6 @@
# Build script for FFTW
#
#------------------------------------------------------------------------------
# Get FFTW versions
. $WM_PROJECT_DIR/etc/config.sh/functions
unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only
@ -48,14 +47,12 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
}
. etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------
Script="${0##*/}"
usage() {
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
cat<<USAGE
usage: $Script [OPTION] [fftw-VERSION]
usage: ${0##*/} [OPTION] [fftw-VERSION]
options:
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
-help
@ -67,8 +64,7 @@ USAGE
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_CXX" ] && export CXX="$WM_CXX"
@ -98,14 +94,12 @@ done
[ -n "$fftwPACKAGE" ] || die "The fftw-VERSION was not specified"
# nothing to build
# Nothing to build
if _foamIsNone "$fftwPACKAGE"
then
echo "Using fftw-none (skip ThirdParty build of FFTW)"
exit 0
fi
if _foamIsSystem "$fftwPACKAGE"
elif _foamIsSystem "$fftwPACKAGE"
then
echo "Using fftw-system (skip ThirdParty build of FFTW)"
exit 0
@ -120,6 +114,7 @@ fi
# - Third-Party builds into 'lib64'
# - system is normally built into 'lib64'
#
# FFTW_ARCH_PATH : installation directory
# FFTW_SOURCE_DIR : location of the original sources
FFTW_ARCH_PATH=$installBASE/$fftwPACKAGE
@ -169,5 +164,4 @@ else
}
fi
#------------------------------------------------------------------------------

View File

@ -88,8 +88,7 @@ USAGE
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
unset optThreadSafe # unset=auto

View File

@ -4,7 +4,7 @@
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
# \\/ M anipulation |
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
@ -28,14 +28,17 @@
# Description
# 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" || {
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
echo " The environment variables are inconsistent with the installation."
@ -44,13 +47,15 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
}
. etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------
usage() {
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
cat<<USAGE
usage: ${0##*/} [gperftools-VERSION]
options:
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
-help
* build gperftools
$gperftoolsPACKAGE
@ -58,16 +63,23 @@ usage: ${0##*/} [gperftools-VERSION]
USAGE
exit 1
}
#------------------------------------------------------------------------------
# Ensure configure gets the correct C/C++ compiler
[ -n "$WM_CC" ] && export CC="$WM_CC"
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
# parse options
# Parse options
while [ "$#" -gt 0 ]
do
case "$1" in
-h | -help)
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%%/}"
;;
*)
@ -77,42 +89,55 @@ do
shift
done
#------------------------------------------------------------------------------
# build/install without compiler name
prefixDIR=$installBASE/$gperftoolsPACKAGE
[ -n "$gperftoolsPACKAGE" ] || die "The gperftools-VERSION was not specified"
# 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/install without compiler name
GPERFTOOLS_ARCH_PATH=$installBASE/$gperftoolsPACKAGE
GPERFTOOLS_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$gperftoolsPACKAGE
echo "---------------"
if [ -d "$prefixDIR" ]
if [ -d "$GPERFTOOLS_ARCH_PATH" ]
then
echo "Already built: $gperftoolsPACKAGE"
else
echo "Starting build: $gperftoolsPACKAGE"
(
sourceDIR=$WM_THIRD_PARTY_DIR/$gperftoolsPACKAGE
buildDIR=$buildBASE/$gperftoolsPACKAGE
(
buildDIR=$buildBASE/$gperftoolsPACKAGE
cd $sourceDIR || exit 1
make distclean 2>/dev/null
cd $GPERFTOOLS_SOURCE_DIR || exit 1
rm -rf $buildDIR
mkdir -p $buildDIR
cd $buildDIR
make distclean 2>/dev/null
# remove old junk
rm -rf $prefixDIR
rm -rf $GPERFTOOLS_ARCH_PATH
rm -rf $buildDIR
mkdir -p $buildDIR
cd $buildDIR
$sourceDIR/configure \
--prefix=$prefixDIR \
&& make -j $WM_NCOMPPROCS \
&& make install \
&& echo "Built: $gperftoolsPACKAGE" \
) || {
echo "Error building: $gperftoolsPACKAGE"
exit 1
}
set -x
$GPERFTOOLS_SOURCE_DIR/configure \
--prefix=$GPERFTOOLS_ARCH_PATH \
&& make -j $WM_NCOMPPROCS \
&& make install \
&& echo "Built: $gperftoolsPACKAGE" \
) || {
echo "Error building: $gperftoolsPACKAGE"
exit 1
}
fi
#------------------------------------------------------------------------------

View File

@ -51,7 +51,7 @@
# 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=Clang # force values for 'clang'
@ -70,14 +70,12 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
}
. etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------
Script=${0##*/}
usage() {
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
cat<<USAGE
usage: $Script [OPTION] [llvm-VERSION]
usage: ${0##*/} [OPTION] [llvm-VERSION]
options:
-cmake PATH with cmake from the path given
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
@ -89,14 +87,12 @@ options:
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
# Parse options
while [ "$#" -gt 0 ]
do
case "$1" in
@ -139,7 +135,6 @@ LLVM_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$llvmPACKAGE
LLVM_BINARY_DIR=$buildBASE/${llvmPACKAGE%%.src}
LLVM_ARCH_PATH=$installBASE/${llvmPACKAGE%%.src}
#
# Build LLVM
#

View File

@ -48,14 +48,12 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
}
. etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------
Script=${0##*/}
usage() {
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
cat<<USAGE
usage: $Script [OPTION] [mesa-VERSION]
usage: ${0##*/} [OPTION] [mesa-VERSION]
options:
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
-help
@ -67,8 +65,7 @@ USAGE
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_CXX" ] && export CXX="$WM_CXX"
@ -79,7 +76,7 @@ then
thirdPartyClang=true
fi
# parse options
# Parse options
while [ "$#" -gt 0 ]
do
case "$1" in
@ -103,14 +100,12 @@ done
[ -n "$mesaPACKAGE" ] || die "The mesa-VERSION was not specified"
# nothing to build
# Nothing to build
if _foamIsNone "$mesaPACKAGE"
then
echo "Using mesa-none (skip ThirdParty build of MESA)"
exit 0
fi
if _foamIsSystem "$mesaPACKAGE"
elif _foamIsSystem "$mesaPACKAGE"
then
echo "Using mesa-system (skip ThirdParty build of MESA)"
exit 0

View File

@ -93,7 +93,6 @@ withGL2=auto
#
#-----------------------------------------------------------------------------
Script=${0##*/}
usage() {
: ${ParaView_VERSION:=none} # some dummy value for usage information
exec 1>&2
@ -154,15 +153,13 @@ Or change the \$WM_PROJECT_DIR/etc/config.sh/paraview settings.
USAGE
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_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 *-mpi*) withMPI=true;; esac
@ -173,13 +170,13 @@ case "$Script" in *-qt*) withQT=true;; esac
setParaViewVersion ${ParaView_VERSION:-none}
#
# various building stages
# Various building stages
#
unset runPATCH runCONFIG runMAKE runINSTALL
runDEFAULT=true
buildType=Release
# parse options
# Parse options
while [ "$#" -gt 0 ]
do
case "$1" in

View File

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

98
makeQt
View File

@ -43,7 +43,6 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
. etc/tools/ThirdPartyFunctions
. etc/tools/QtFunctions
#------------------------------------------------------------------------------
usage() {
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
@ -60,13 +59,13 @@ USAGE
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_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 ]
do
case "$1" in
@ -117,63 +116,62 @@ then
echo "Already built: Qt-$qtVERSION"
else
echo "Starting build: Qt-$qtVERSION"
(
# Configuration options:
unset configOpt
configOpt="$configOpt -nomake examples"
(
# Configuration options:
unset configOpt
configOpt="$configOpt -nomake examples"
case "$qtVERSION" in
4*) # QT-4
# Without demos.
configOpt="$configOpt -nomake demos"
case "$qtVERSION" in
4*) # QT-4
# Without demos.
configOpt="$configOpt -nomake demos"
# Without old qt3 transition code
configOpt="$configOpt -no-qt3support"
# Without old qt3 transition code
configOpt="$configOpt -no-qt3support"
# Without WebKit - uses std:tr1 and does not compile with c++11
# Fortunately WebKit is now optional for ParaView
configOpt="$configOpt -no-webkit"
;;
# Without WebKit - uses std:tr1 and does not compile with c++11
# Fortunately WebKit is now optional for ParaView
configOpt="$configOpt -no-webkit"
;;
*) # QT-5
# Avoid too many X11 system dependencies.
configOpt="$configOpt -qt-xcb"
;;
esac
*) # QT-5
# Avoid too many X11 system dependencies.
configOpt="$configOpt -qt-xcb"
;;
esac
# end of configuration options
# ----------------------------
buildDIR=$buildBASE/$qtPACKAGE
# end of configuration options
# ----------------------------
buildDIR=$buildBASE/$qtPACKAGE
cd $QT_SOURCE_DIR || exit 1
[ -e Makefile ] && make distclean 2>/dev/null
cd $QT_SOURCE_DIR || exit 1
[ -e Makefile ] && make distclean 2>/dev/null
# Remove any existing build folder and recreate
rm -rf $QT_ARCH_DIR
rm -rf $buildDIR 2>/dev/null
mkdir -p $buildDIR
# Remove any existing build folder and recreate
rm -rf $QT_ARCH_DIR
rm -rf $buildDIR 2>/dev/null
mkdir -p $buildDIR
# Remove any remnants from a previous shadow build
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.cpp" 2>/dev/null
# Remove any remnants from a previous shadow build
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.cpp" 2>/dev/null
cd $buildDIR || exit 1
cd $buildDIR || exit 1
# Compile as opensource, accepting LGPL conditions (yes)
echo yes | $QT_SOURCE_DIR/configure \
-prefix $QT_ARCH_PATH \
-opensource \
$configOpt \
&& time make -j $WM_NCOMPPROCS \
&& make install \
&& echo "Built: Qt-$qtVERSION" \
&& finalizeQt
) || {
echo "Error building: Qt-$qtVERSION"
exit 1
}
# Compile as opensource, accepting LGPL conditions (yes)
echo yes | $QT_SOURCE_DIR/configure \
-prefix $QT_ARCH_PATH \
-opensource \
$configOpt \
&& time make -j $WM_NCOMPPROCS \
&& make install \
&& echo "Built: Qt-$qtVERSION" \
&& finalizeQt
) || {
echo "Error building: Qt-$qtVERSION"
exit 1
}
fi
# ----------------------------------------------------------------- end-of-file

View File

@ -29,8 +29,7 @@
# Build Tecplot library
#
#------------------------------------------------------------------------------
# Get boost versions
# Get boost version (headers only)
. $WM_PROJECT_DIR/etc/config.sh/functions
unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only
@ -41,7 +40,7 @@ tecioPACKAGE=tecio
targetType=lib
#------------------------------------------------------------------------------
# run from third-party directory only
# 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"
@ -56,7 +55,6 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
}
. etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------
usage()
{
exec 1>&2
@ -65,8 +63,8 @@ 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
-cmake PATH With cmake from the path given
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
-help
@ -77,13 +75,12 @@ options:
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
# Parse options
while [ "$#" -gt 0 ]
do
case "$1" in
@ -121,16 +118,19 @@ done
# Get Boost information
# - only headers are required
BOOST_ARCH_PATH=$installBASE/$boostPACKAGE
: ${BOOST_ARCH_PATH:=$installBASE/$boostPACKAGE} # Fallback
boostInc="$BOOST_ARCH_PATH/include"
if _foamIsSystem $BOOST_ARCH_PATH
if _foamIsSystem $boostPACKAGE
then
echo "Using boost-system"
boostInc="/usr/include"
elif [ -f "$boostInc/boost/version.hpp" -a -d "$boostLib" ]
# 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
@ -140,7 +140,7 @@ fi
#
# TECIO_SOURCE_DIR : location of the original sources
# TECIO_BINARY_DIR : location of the build
# TECIO_DIR : location of the installed program
# TECIO_ARCH_PATH : location of the installed program
TECIO_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$tecioPACKAGE/teciosrc
TECIO_BINARY_DIR=$buildBASE/$tecioPACKAGE
@ -180,7 +180,7 @@ then
set -x
cd $TECIO_BINARY_DIR && $cmake \
-DCMAKE_INSTALL_PREFIX=$TECIO_ARCH_PATH \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BINARY_TYPE=Release \
-DBoost_INCLUDE_DIR=$boostInc \
$TECIO_SOURCE_DIR \
&& make -j $WM_NCOMPPROCS \

View File

@ -70,13 +70,11 @@ CMAKE_PATH=""
# Default to auto-config based on VTK version
withGL2=auto
#
# NO FURTHER EDITING BELOW THIS LINE
#
#-----------------------------------------------------------------------------
Script=${0##*/}
usage() {
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
@ -124,20 +122,19 @@ USAGE
}
#------------------------------------------------------------------------------
# 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_CXX" ] && export CXX="$WM_CXX"
#
# various building stages
# Various building stages
#
unset runPATCH runCONFIG runMAKE runINSTALL
runDEFAULT=true
buildType=Release
withOSMESA=false
# parse options
# Parse options
while [ "$#" -gt 0 ]
do
case "$1" in

View File

@ -4,6 +4,7 @@
vtk=vtk-7.1.0
mesa=mesa-11.2.2
# mesa=mesa-13.0.2
./makeVTK \
$vtk \