From 907e04f35c8e16f3db7081d6d2d3493371c12d73 Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 19 Jan 2017 16:38:14 +0100 Subject: [PATCH] COMP: adjust makeParaView for build with mesa --- etc/tools/ParaViewFunctions | 5 ++--- makeParaView | 35 +++++++++++++++++++++++++++-------- makeParaView.example | 6 +++--- makeVTK | 35 ++++++++++++++++++++++------------- makeVTK.example | 4 ++-- 5 files changed, 56 insertions(+), 29 deletions(-) diff --git a/etc/tools/ParaViewFunctions b/etc/tools/ParaViewFunctions index f4d3bde..9232332 100644 --- a/etc/tools/ParaViewFunctions +++ b/etc/tools/ParaViewFunctions @@ -36,6 +36,7 @@ unset withMPI MPI_MAX_PROCS unset withQT QT_VERSION QMAKE_PATH unset withMESA MESA_INCLUDE MESA_LIBRARY withOSMESA unset withPYTHON PYTHON_INCLUDE PYTHON_LIBRARY +unset withGL2 unset OBJ_ADD BUILD_TYPE=Release # The cmake build type @@ -266,9 +267,7 @@ addMesaSupport() if [ -d "$MESA_INCLUDE" -a -f "$MESA_LIBRARY" ] then - OBJ_ADD="$OBJ_ADD-mesa" - - addCMakeVariable "VTK_OPENGL_HAS_OSMESA:BOOL=ON" + addCMakeVariable "VTK_OPENGL_HAS_OSMESA=ON" addCMakeVariable "OSMESA_INCLUDE_DIR=$MESA_INCLUDE" addCMakeVariable "OSMESA_LIBRARY=$MESA_LIBRARY" diff --git a/makeParaView b/makeParaView index 600a46a..91a64a6 100755 --- a/makeParaView +++ b/makeParaView @@ -88,31 +88,30 @@ usage() { usage: $Script [OPTION] [paraview-VERSION] [CMAKE-OPTION] options: + -gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX -rebuild for repeated builds (-make -install) *use with caution* -gl2 with new rendering backend (if not already enabled) -mesa with mesa (if not already enabled) + -mesa-prefix DIR location of mesa installation (sets -mesa-include, -mesa-lib) + -mesa-include DIR location of mesa headers (current value: ${MESA_INCLUDE:-none}) + -mesa-lib PATH path to mesa library (current value: ${MESA_LIBRARY:-none}) -mpi with mpi (if not already enabled) - -mpi=NPROCS with mpi and max 'NPROCS' processes. NPROCS=0 for no - upper-limit on processes. + -mpi=N with max 'N' mpi processes. N=0 for no upper-limit. -python with python (if not already enabled) + -python-lib PATH path to python library (current value: ${PYTHON_LIBRARY:-none}) -cmake PATH with cmake from the 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 -buildType NAME specify the build type (default: Release) - -mesa-prefix DIR location of mesa installation (sets -mesa-include, -mesa-lib) - -mesa-include DIR location of mesa headers (current value: ${MESA_INCLUDE:-none}) - -mesa-lib PATH path to mesa library (current value: ${MESA_LIBRARY:-none}) - -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 + -no-gl2 | -no-mesa | -no-mpi | -no-python | -no-qt CMake options start with a capital letter and contain an '='. For example, @@ -213,8 +212,16 @@ do -mesa) withMESA=true ;; + -osmesa) + echo + echo "The -osmesa option is currently ignored" + echo + # withMESA=true + # withOSMESA=true + ;; -no-mesa) withMESA=false + withOSMESA=false ;; -mesa-prefix) [ "$#" -ge 2 ] || die "'$1' option requires an argument" @@ -225,11 +232,13 @@ do ;; -mesa-include) [ "$#" -ge 2 ] || die "'$1' option requires an argument" + withMESA=true MESA_INCLUDE="${2%%/}" shift ;; -mesa-lib) [ "$#" -ge 2 ] || die "'$1' option requires an argument" + withMESA=true MESA_LIBRARY="${2%%/}" shift ;; @@ -326,6 +335,16 @@ then : ${runINSTALL:=true} fi +if [ "$withMESA" = true ] +then + : ${withQT:=false} # No QT unless explicitly requested + addCMakeVariable "VTK_USE_X=OFF" + # addCMakeVariable "OPENGL_INCLUDE_DIR=IGNORE" + # addCMakeVariable "OPENGL_gl_LIBRARY=IGNORE" + # addCMakeVariable "OPENGL_xmesa_INCLUDE_DIR=IGNORE" + ## seems to be unnecessary => addCMakeVariable "VTK_USE_OFFSCREEN=OFF" +fi + # Set configure options #~~~~~~~~~~~~~~~~~~~~~~ diff --git a/makeParaView.example b/makeParaView.example index 5fe489e..aeb60be 100755 --- a/makeParaView.example +++ b/makeParaView.example @@ -1,10 +1,10 @@ #!/bin/sh # An example for building particular combinations of ParaView with # - mpi (0 = no upper-limit on processes) -# - off-screen mesa +# - mesa -mesa=mesa-11.2.2 -# mesa=mesa-13.0.2 +# mesa=mesa-11.2.2 +mesa=mesa-13.0.3 ./makeParaView \ -mpi=0 \ diff --git a/makeVTK b/makeVTK index 92d4ffa..ea01f2a 100755 --- a/makeVTK +++ b/makeVTK @@ -74,25 +74,24 @@ usage() { usage: $Script [OPTION] [vtk-VERSION] [CMAKE-OPTION] options: + -gcc force g++ instead of the value from \$WM_CXX -rebuild for repeated builds (-make -install) *use with caution* -gl2 with new rendering backend (if not already enabled) -mesa with mesa (if not already enabled) - -osmesa with off-screen mesa only - -mpi with mpi (if not already enabled) - -mpi=NPROCS with mpi and max 'NPROCS' processes. NPROCS=0 for no - upper-limit on processes. - -cmake PATH with cmake from the path given - -gcc force g++ instead of the value from \$WM_CXX - -verbose verbose output in Makefiles - -version VER specify an alternative version (current value: $VTK_VERSION) - -buildType NAME specify the build type (default: Release) -mesa-prefix DIR location of mesa installation -mesa-include DIR location of mesa headers (current value: ${MESA_INCLUDE:-none}) -mesa-lib PATH path to mesa library (current value: ${MESA_LIBRARY:-none}) + -osmesa with off-screen mesa only + -mpi with mpi (if not already enabled) + -mpi=N with max 'N' mpi processes. N=0 for no upper-limit. + -cmake PATH with cmake from the path given + -verbose verbose output in Makefiles + -version VER specify an alternative version (current value: $VTK_VERSION) + -buildType NAME specify the build type (default: Release) -help The -no-FEATURE option can be disable these features (if not already disabled): - mesa mpi + -no-gl2 | -no-mesa | -no-mpi CMake options start with a capital letter and contain an '='. For example, @@ -100,6 +99,7 @@ For example, to add tests and avoid building documentation For finer control, the build stages can be selected or deselected individually: + -patch -no-patch -config -no-config -make -no-make -install -no-install @@ -140,6 +140,13 @@ do export CC=gcc # use gcc/g++ export CXX=g++ ;; + -patch) # stage 0: patch sources + runPATCH=true + unset runDEFAULT + ;; + -no-patch) + runPATCH=false + ;; -config) # stage 1: config only runCONFIG=true unset runDEFAULT @@ -192,11 +199,13 @@ do ;; -mesa-include) [ "$#" -ge 2 ] || die "'$1' option requires an argument" + withMESA=true MESA_INCLUDE="${2%%/}" shift ;; -mesa-lib) [ "$#" -ge 2 ] || die "'$1' option requires an argument" + withMESA=true MESA_LIBRARY="${2%%/}" shift ;; @@ -266,14 +275,14 @@ addMpiSupport # set MPI-specific options addMesaSupport # set MESA-specific options addGL2Support # new rendering backend -# set off-screen only options +# Set off-screen options if [ "$withOSMESA" = true ] then - addCMakeVariable "VTK_USE_X:BOOL=OFF" + addCMakeVariable "VTK_USE_X=OFF" addCMakeVariable "OPENGL_INCLUDE_DIR=$MESA_INCLUDE" - addCMakeVariable "OPENGL_xmesa_INCLUDE_DIR=$MESA_INCLUDE" addCMakeVariable "OPENGL_gl_LIBRARY=$MESA_LIBRARY" addCMakeVariable "OPENGL_glu_LIBRARY=$MESA_LIBRARY" + addCMakeVariable "OPENGL_xmesa_INCLUDE_DIR=$MESA_INCLUDE" fi setVtkDirs # where things are or should be put diff --git a/makeVTK.example b/makeVTK.example index a4566d1..3cd33d2 100755 --- a/makeVTK.example +++ b/makeVTK.example @@ -1,10 +1,10 @@ #!/bin/sh # An example for building particular combinations of VTK with -# - off-screen mesa +# - mesa (off-screen only) vtk=VTK-7.1.0 # mesa=mesa-11.2.2 -mesa=mesa-13.0.1 +mesa=mesa-13.0.3 ./makeVTK \ $vtk \