mirror of
https://develop.openfoam.com/Development/ThirdParty-common.git
synced 2025-12-08 06:57:50 +00:00
COMP: adjust makeParaView for build with mesa
This commit is contained in:
@ -36,6 +36,7 @@ unset withMPI MPI_MAX_PROCS
|
|||||||
unset withQT QT_VERSION QMAKE_PATH
|
unset withQT QT_VERSION QMAKE_PATH
|
||||||
unset withMESA MESA_INCLUDE MESA_LIBRARY withOSMESA
|
unset withMESA MESA_INCLUDE MESA_LIBRARY withOSMESA
|
||||||
unset withPYTHON PYTHON_INCLUDE PYTHON_LIBRARY
|
unset withPYTHON PYTHON_INCLUDE PYTHON_LIBRARY
|
||||||
|
unset withGL2
|
||||||
unset OBJ_ADD
|
unset OBJ_ADD
|
||||||
|
|
||||||
BUILD_TYPE=Release # The cmake build type
|
BUILD_TYPE=Release # The cmake build type
|
||||||
@ -266,9 +267,7 @@ addMesaSupport()
|
|||||||
|
|
||||||
if [ -d "$MESA_INCLUDE" -a -f "$MESA_LIBRARY" ]
|
if [ -d "$MESA_INCLUDE" -a -f "$MESA_LIBRARY" ]
|
||||||
then
|
then
|
||||||
OBJ_ADD="$OBJ_ADD-mesa"
|
addCMakeVariable "VTK_OPENGL_HAS_OSMESA=ON"
|
||||||
|
|
||||||
addCMakeVariable "VTK_OPENGL_HAS_OSMESA:BOOL=ON"
|
|
||||||
addCMakeVariable "OSMESA_INCLUDE_DIR=$MESA_INCLUDE"
|
addCMakeVariable "OSMESA_INCLUDE_DIR=$MESA_INCLUDE"
|
||||||
addCMakeVariable "OSMESA_LIBRARY=$MESA_LIBRARY"
|
addCMakeVariable "OSMESA_LIBRARY=$MESA_LIBRARY"
|
||||||
|
|
||||||
|
|||||||
35
makeParaView
35
makeParaView
@ -88,31 +88,30 @@ usage() {
|
|||||||
|
|
||||||
usage: $Script [OPTION] [paraview-VERSION] [CMAKE-OPTION]
|
usage: $Script [OPTION] [paraview-VERSION] [CMAKE-OPTION]
|
||||||
options:
|
options:
|
||||||
|
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||||
-rebuild for repeated builds (-make -install) *use with caution*
|
-rebuild for repeated builds (-make -install) *use with caution*
|
||||||
-gl2 with new rendering backend (if not already enabled)
|
-gl2 with new rendering backend (if not already enabled)
|
||||||
-mesa with mesa (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 with mpi (if not already enabled)
|
||||||
-mpi=NPROCS with mpi and max 'NPROCS' processes. NPROCS=0 for no
|
-mpi=N with max 'N' mpi processes. N=0 for no upper-limit.
|
||||||
upper-limit on processes.
|
|
||||||
-python with python (if not already enabled)
|
-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
|
-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
|
||||||
\$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/qt-VER/bin/qmake
|
\$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/qt-VER/bin/qmake
|
||||||
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
|
||||||
-verbose verbose output in Makefiles
|
-verbose verbose output in Makefiles
|
||||||
-version VER specify an alternative version (current value: $ParaView_VERSION)
|
-version VER specify an alternative version (current value: $ParaView_VERSION)
|
||||||
-major VER specify an alternative major version for special builds
|
-major VER specify an alternative major version for special builds
|
||||||
-buildType NAME specify the build type (default: Release)
|
-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
|
-help
|
||||||
|
|
||||||
The -no-FEATURE option can be used to forcibly disable these features:
|
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 '='.
|
CMake options start with a capital letter and contain an '='.
|
||||||
For example,
|
For example,
|
||||||
@ -213,8 +212,16 @@ do
|
|||||||
-mesa)
|
-mesa)
|
||||||
withMESA=true
|
withMESA=true
|
||||||
;;
|
;;
|
||||||
|
-osmesa)
|
||||||
|
echo
|
||||||
|
echo "The -osmesa option is currently ignored"
|
||||||
|
echo
|
||||||
|
# withMESA=true
|
||||||
|
# withOSMESA=true
|
||||||
|
;;
|
||||||
-no-mesa)
|
-no-mesa)
|
||||||
withMESA=false
|
withMESA=false
|
||||||
|
withOSMESA=false
|
||||||
;;
|
;;
|
||||||
-mesa-prefix)
|
-mesa-prefix)
|
||||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
@ -225,11 +232,13 @@ do
|
|||||||
;;
|
;;
|
||||||
-mesa-include)
|
-mesa-include)
|
||||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
withMESA=true
|
||||||
MESA_INCLUDE="${2%%/}"
|
MESA_INCLUDE="${2%%/}"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-mesa-lib)
|
-mesa-lib)
|
||||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
withMESA=true
|
||||||
MESA_LIBRARY="${2%%/}"
|
MESA_LIBRARY="${2%%/}"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
@ -326,6 +335,16 @@ then
|
|||||||
: ${runINSTALL:=true}
|
: ${runINSTALL:=true}
|
||||||
fi
|
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
|
# Set configure options
|
||||||
#~~~~~~~~~~~~~~~~~~~~~~
|
#~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# An example for building particular combinations of ParaView with
|
# An example for building particular combinations of ParaView with
|
||||||
# - mpi (0 = no upper-limit on processes)
|
# - mpi (0 = no upper-limit on processes)
|
||||||
# - off-screen mesa
|
# - mesa
|
||||||
|
|
||||||
mesa=mesa-11.2.2
|
# mesa=mesa-11.2.2
|
||||||
# mesa=mesa-13.0.2
|
mesa=mesa-13.0.3
|
||||||
|
|
||||||
./makeParaView \
|
./makeParaView \
|
||||||
-mpi=0 \
|
-mpi=0 \
|
||||||
|
|||||||
35
makeVTK
35
makeVTK
@ -74,25 +74,24 @@ usage() {
|
|||||||
|
|
||||||
usage: $Script [OPTION] [vtk-VERSION] [CMAKE-OPTION]
|
usage: $Script [OPTION] [vtk-VERSION] [CMAKE-OPTION]
|
||||||
options:
|
options:
|
||||||
|
-gcc force g++ instead of the value from \$WM_CXX
|
||||||
-rebuild for repeated builds (-make -install) *use with caution*
|
-rebuild for repeated builds (-make -install) *use with caution*
|
||||||
-gl2 with new rendering backend (if not already enabled)
|
-gl2 with new rendering backend (if not already enabled)
|
||||||
-mesa with mesa (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-prefix DIR location of mesa installation
|
||||||
-mesa-include DIR location of mesa headers (current value: ${MESA_INCLUDE:-none})
|
-mesa-include DIR location of mesa headers (current value: ${MESA_INCLUDE:-none})
|
||||||
-mesa-lib PATH path to mesa library (current value: ${MESA_LIBRARY:-none})
|
-mesa-lib PATH path to mesa library (current value: ${MESA_LIBRARY:-none})
|
||||||
|
-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
|
-help
|
||||||
|
|
||||||
The -no-FEATURE option can be disable these features (if not already disabled):
|
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 '='.
|
CMake options start with a capital letter and contain an '='.
|
||||||
For example,
|
For example,
|
||||||
@ -100,6 +99,7 @@ For example,
|
|||||||
to add tests and avoid building documentation
|
to add tests and avoid building documentation
|
||||||
|
|
||||||
For finer control, the build stages can be selected or deselected individually:
|
For finer control, the build stages can be selected or deselected individually:
|
||||||
|
-patch -no-patch
|
||||||
-config -no-config
|
-config -no-config
|
||||||
-make -no-make
|
-make -no-make
|
||||||
-install -no-install
|
-install -no-install
|
||||||
@ -140,6 +140,13 @@ do
|
|||||||
export CC=gcc # use gcc/g++
|
export CC=gcc # use gcc/g++
|
||||||
export CXX=g++
|
export CXX=g++
|
||||||
;;
|
;;
|
||||||
|
-patch) # stage 0: patch sources
|
||||||
|
runPATCH=true
|
||||||
|
unset runDEFAULT
|
||||||
|
;;
|
||||||
|
-no-patch)
|
||||||
|
runPATCH=false
|
||||||
|
;;
|
||||||
-config) # stage 1: config only
|
-config) # stage 1: config only
|
||||||
runCONFIG=true
|
runCONFIG=true
|
||||||
unset runDEFAULT
|
unset runDEFAULT
|
||||||
@ -192,11 +199,13 @@ do
|
|||||||
;;
|
;;
|
||||||
-mesa-include)
|
-mesa-include)
|
||||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
withMESA=true
|
||||||
MESA_INCLUDE="${2%%/}"
|
MESA_INCLUDE="${2%%/}"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-mesa-lib)
|
-mesa-lib)
|
||||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
withMESA=true
|
||||||
MESA_LIBRARY="${2%%/}"
|
MESA_LIBRARY="${2%%/}"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
@ -266,14 +275,14 @@ addMpiSupport # set MPI-specific options
|
|||||||
addMesaSupport # set MESA-specific options
|
addMesaSupport # set MESA-specific options
|
||||||
addGL2Support # new rendering backend
|
addGL2Support # new rendering backend
|
||||||
|
|
||||||
# set off-screen only options
|
# Set off-screen options
|
||||||
if [ "$withOSMESA" = true ]
|
if [ "$withOSMESA" = true ]
|
||||||
then
|
then
|
||||||
addCMakeVariable "VTK_USE_X:BOOL=OFF"
|
addCMakeVariable "VTK_USE_X=OFF"
|
||||||
addCMakeVariable "OPENGL_INCLUDE_DIR=$MESA_INCLUDE"
|
addCMakeVariable "OPENGL_INCLUDE_DIR=$MESA_INCLUDE"
|
||||||
addCMakeVariable "OPENGL_xmesa_INCLUDE_DIR=$MESA_INCLUDE"
|
|
||||||
addCMakeVariable "OPENGL_gl_LIBRARY=$MESA_LIBRARY"
|
addCMakeVariable "OPENGL_gl_LIBRARY=$MESA_LIBRARY"
|
||||||
addCMakeVariable "OPENGL_glu_LIBRARY=$MESA_LIBRARY"
|
addCMakeVariable "OPENGL_glu_LIBRARY=$MESA_LIBRARY"
|
||||||
|
addCMakeVariable "OPENGL_xmesa_INCLUDE_DIR=$MESA_INCLUDE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
setVtkDirs # where things are or should be put
|
setVtkDirs # where things are or should be put
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# An example for building particular combinations of VTK with
|
# An example for building particular combinations of VTK with
|
||||||
# - off-screen mesa
|
# - mesa (off-screen only)
|
||||||
|
|
||||||
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
|
mesa=mesa-13.0.3
|
||||||
|
|
||||||
./makeVTK \
|
./makeVTK \
|
||||||
$vtk \
|
$vtk \
|
||||||
|
|||||||
Reference in New Issue
Block a user