From cc2161856b146e8d84bd693068dd646cdace1e79 Mon Sep 17 00:00:00 2001 From: mark Date: Sun, 27 Nov 2016 15:57:51 +0100 Subject: [PATCH] ENH: improve third-party make with central installations - initial attempt for building CGAL as headers-only, and without gmp/mpfr --- BUILD.md | 6 +- etc/tools/ThirdPartyFunctions | 2 +- makeADIOS | 18 +++--- makeCCMIO | 10 ++- makeCGAL | 112 ++++++++++++++++++++++++---------- makeCmake | 50 +++++++-------- makeFFTW | 16 ++--- makeGcc | 3 +- makeGperftools | 89 +++++++++++++++++---------- makeLLVM | 11 +--- makeMesa | 15 ++--- makeParaView | 11 ++-- makeParaView.example | 1 + makeQt | 98 +++++++++++++++-------------- makeTecio | 28 ++++----- makeVTK | 9 +-- makeVTK.example | 1 + 17 files changed, 265 insertions(+), 215 deletions(-) diff --git a/BUILD.md b/BUILD.md index 54290db..98ffb9b 100644 --- a/BUILD.md +++ b/BUILD.md @@ -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 diff --git a/etc/tools/ThirdPartyFunctions b/etc/tools/ThirdPartyFunctions index 0d9055e..21e6104 100644 --- a/etc/tools/ThirdPartyFunctions +++ b/etc/tools/ThirdPartyFunctions @@ -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}" } diff --git a/makeADIOS b/makeADIOS index deebe3f..17f245f 100755 --- a/makeADIOS +++ b/makeADIOS @@ -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" } diff --git a/makeCCMIO b/makeCCMIO index 74a246b..0b6a120 100755 --- a/makeCCMIO +++ b/makeCCMIO @@ -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 ) - #------------------------------------------------------------------------------ diff --git a/makeCGAL b/makeCGAL index f365036..0a73530 100755 --- a/makeCGAL +++ b/makeCGAL @@ -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 <&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 #------------------------------------------------------------------------------ diff --git a/makeFFTW b/makeFFTW index 07e46d3..d91c7cd 100755 --- a/makeFFTW +++ b/makeFFTW @@ -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<&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat</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 #------------------------------------------------------------------------------ diff --git a/makeLLVM b/makeLLVM index 8d301bb..ad065c1 100755 --- a/makeLLVM +++ b/makeLLVM @@ -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<&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat<&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 diff --git a/makeParaView.example b/makeParaView.example index 361b69c..5fe489e 100755 --- a/makeParaView.example +++ b/makeParaView.example @@ -4,6 +4,7 @@ # - off-screen mesa mesa=mesa-11.2.2 +# mesa=mesa-13.0.2 ./makeParaView \ -mpi=0 \ diff --git a/makeQt b/makeQt index 1b65e6e..9e545e9 100755 --- a/makeQt +++ b/makeQt @@ -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 diff --git a/makeTecio b/makeTecio index 6ee8132..41a3af7 100755 --- a/makeTecio +++ b/makeTecio @@ -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 \ diff --git a/makeVTK b/makeVTK index d87b7ce..151d57f 100755 --- a/makeVTK +++ b/makeVTK @@ -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 diff --git a/makeVTK.example b/makeVTK.example index a21d682..fcfe492 100755 --- a/makeVTK.example +++ b/makeVTK.example @@ -4,6 +4,7 @@ vtk=vtk-7.1.0 mesa=mesa-11.2.2 +# mesa=mesa-13.0.2 ./makeVTK \ $vtk \