ENH: support building of paraview with Qt5

- this is the upcoming default Qt version
This commit is contained in:
mark
2017-01-19 10:37:41 +01:00
parent 122ee3386e
commit 705556c3eb
6 changed files with 164 additions and 166 deletions

View File

@ -424,7 +424,7 @@ The minimum gcc/g++ requirements for building various components.
[page Qt]: https://www.qt.io/download-open-source/ [page Qt]: https://www.qt.io/download-open-source/
[repo Qt]: http://code.qt.io/cgit/qt-creator/qt-creator.git [repo Qt]: http://code.qt.io/cgit/qt-creator/qt-creator.git
[link Qt]: http://download.qt.io/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz [link Qt]: http://download.qt.io/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz
[newer Qt5]: http://download.qt.io/official_releases/qt/5.7/5.7.0/single/qt-everywhere-opensource-src-5.7.0.tar.gz [newer Qt5]: http://download.qt.io/official_releases/qt/5.7/5.7.1/single/qt-everywhere-opensource-src-5.7.0.tar.xz
<!-- Standard Footer --> <!-- Standard Footer -->

View File

@ -3,7 +3,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) 2011-2016 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. # \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
# This file is part of OpenFOAM. # This file is part of OpenFOAM.
@ -29,7 +29,20 @@
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# sourceBASE, buildBASE, installBASE defined in tools/ThirdPartyFunctions # Variables referenced by the functions. Initialization at the end of the file.
unset CMAKE_VARIABLES
unset withVERBOSE
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 OBJ_ADD
BUILD_TYPE=Release # The cmake build type
# sourceBASE, buildBASE, installBASE
# are defined in tools/ThirdPartyFunctions
#------------------------------------------------------------------------------
# #
# Where things are or should be put # Where things are or should be put
@ -74,7 +87,7 @@ setParaViewDirs()
echo "ParaView_BINARY_DIR=$ParaView_BINARY_DIR" echo "ParaView_BINARY_DIR=$ParaView_BINARY_DIR"
echo "ParaView_DIR=$ParaView_DIR" echo "ParaView_DIR=$ParaView_DIR"
# Forcefully override the .git path for the ParaView source code directory # Prevent git queries from using the ThirdParty repository
export GIT_DIR=$ParaView_SOURCE_DIR/.git export GIT_DIR=$ParaView_SOURCE_DIR/.git
} }
@ -123,6 +136,7 @@ checkVersion()
fi fi
} }
# #
# Set CMake cache variables # Set CMake cache variables
# #
@ -281,40 +295,37 @@ addGL2Support()
} }
#
# Qt 4/5 support
#
addQtSupport() addQtSupport()
{ {
QtVersion=none QT_VERSION=none
: ${withQT:=true} # default is on
if [ "${withQT:=false}" != true ] if [ "$withQT" = false ]
then then
# Explicitly disabled
addCMakeVariable "PARAVIEW_BUILD_QT_GUI=OFF"
return return
fi fi
local qmake qtLib
# Check qmake can be found and handle version differences
qmake=$(findQtMake)
if QT_VERSION=$($qmake -query QT_VERSION 2>/dev/null)
then
addCMakeVariable "PARAVIEW_BUILD_QT_GUI=ON" addCMakeVariable "PARAVIEW_BUILD_QT_GUI=ON"
local qmake=$(findQtMake) case "$QT_VERSION" in
(3.* | 4.[0-4]*)
# From somewhere other than in the path
if [ "${qmake:=qmake}" != qmake ]
then
addCMakeVariable "QT_QMAKE_EXECUTABLE:FILEPATH=$qmake"
fi
# 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)
case "$QtVersion" in
3.* | 4.[0-4]*)
# QT is too old # QT is too old
cat <<ERROR cat <<ERROR
---- ----
Error: ${0##*/} Error: ${0##*/}
QT version ($QtVersion) provided < 4.5 QT version ($QT_VERSION) provided < 4.5
Please use the -qmake option to specify the location of a newer QT version Please use the -qmake option to specify the location of a newer QT version
For example, For example,
... -qmake /usr/local/qt-4.6.2/bin/qmake ... -qmake /usr/local/qt-4.6.2/bin/qmake
@ -324,12 +335,32 @@ ERROR
exit 1 exit 1
;; ;;
5.*) (4.*)
# QT4 is the default, must specify QT5 explicitly # Default changed to Qt5 with paraview 5.2.1, so specify explicitly
addCMakeVariable "PARAVIEW_QT_VERSION:STRING=5" addCMakeVariable "PARAVIEW_QT_VERSION=4"
# Non-system installation - specify location of qmake
if [ "$qmake" != /usr/bin/qmake ]
then
addCMakeVariable "QT_QMAKE_EXECUTABLE=$qmake"
fi
;;
(5.*)
# Default changed to Qt5 with paraview 5.2.1, so specify explicitly
addCMakeVariable "PARAVIEW_QT_VERSION=5"
# Non-system installation - find CMake config files
if [ "$qmake" != /usr/bin/qmake ] \
&& qtLib="$($qmake -query QT_INSTALL_LIBS)/cmake/Qt5" \
&& [ -d "$qtLib" ]
then
addCMakeVariable "Qt5_DIR=$qtLib"
fi
;; ;;
esac esac
else else
QT_VERSION=none
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 echo
exit 1 exit 1
@ -362,7 +393,7 @@ configParaView()
fi fi
mkdir -p $ParaView_BINARY_DIR mkdir -p $ParaView_BINARY_DIR
addCMakeVariable "CMAKE_BUILD_TYPE:STRING=$buildType" addCMakeVariable "CMAKE_BUILD_TYPE=$BUILD_TYPE"
cd $ParaView_BINARY_DIR || exit 1 # Change to build folder cd $ParaView_BINARY_DIR || exit 1 # Change to build folder
@ -372,16 +403,15 @@ configParaView()
echo " Python support : ${withPYTHON:-false}" echo " Python support : ${withPYTHON:-false}"
echo " MESA support : ${withMESA:-false}" echo " MESA support : ${withMESA:-false}"
echo " GL2 rendering : ${withGL2:-false}" echo " GL2 rendering : ${withGL2:-false}"
echo " Qt dev support : ${withQT:-false}" echo " QT dev support : ${withQT:-true}"
echo " Source : $ParaView_SOURCE_DIR" echo " Source : $ParaView_SOURCE_DIR"
echo " Build : $ParaView_BINARY_DIR" echo " Build : $ParaView_BINARY_DIR"
echo " Target : $ParaView_DIR" echo " Target : $ParaView_DIR"
echo " Build type : $buildType" echo " cmake : $cmake"
echo " Cmake : $cmake"
echo "----" echo "----"
echo echo
echo "$cmake" \ echo "$cmake" \
-DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \ -DCMAKE_INSTALL_PREFIX=$ParaView_DIR \
$CMAKE_VARIABLES \ $CMAKE_VARIABLES \
$ParaView_SOURCE_DIR $ParaView_SOURCE_DIR
echo echo
@ -390,7 +420,7 @@ configParaView()
# Run cmake to create Makefiles # Run cmake to create Makefiles
$cmake \ $cmake \
-DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \ -DCMAKE_INSTALL_PREFIX=$ParaView_DIR \
$CMAKE_VARIABLES \ $CMAKE_VARIABLES \
$ParaView_SOURCE_DIR $ParaView_SOURCE_DIR
} }
@ -426,38 +456,44 @@ installParaView()
make install make install
cat<< INFO # System or non-system installation of QT?
local qmake qtLib QT_VERSION
if qmake=$(findQtMake 2>/dev/null)
then
qtLib=$($qmake -query QT_INSTALL_LIBS)
QT_VERSION=$($qmake -query QT_VERSION 2>/dev/null)
fi
--- /bin/cat<<INFO
Installation complete for paraview-$ParaView_VERSION
====
Installation complete for paraview-$ParaView_VERSION with qt-${QT_VERSION:-none}
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
# Non-system installation of QT?
if [ "$qmake" != /usr/bin/qmake -a -d "$qtLib" ]
then
cat<< INFO
And adjust your LD_LIBRARY_PATH to include the following:
$qtLib
INFO
fi
echo "===="
} }
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# 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
unset buildType
# Start with these general settings # Start with these general settings
addCMakeVariable "BUILD_SHARED_LIBS:BOOL=ON VTK_USE_RPATH:BOOL=OFF" addCMakeVariable "BUILD_SHARED_LIBS=ON" "BUILD_TESTING=OFF"
# Include development files in "make install" # Include development files in "make install"
addCMakeVariable "PARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=ON" addCMakeVariable "PARAVIEW_INSTALL_DEVELOPMENT_FILES=ON"
# Don't build test tree
addCMakeVariable "BUILD_TESTING:BOOL=OFF"
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -86,18 +86,19 @@ _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 #
# On success: return the resolved value as output.
# On failure: just report what is found in the path.
# #
unset CMAKE_PATH # clear when first loaded unset CMAKE_PATH # clear when first loaded
findCMake() findCMake()
{ {
local candidate local candidate foundExe
local foundExe
if [ -n "$CMAKE_PATH" ] if [ -n "$CMAKE_PATH" ]
then then
# check as directory # Check as directory
if [ -d "$CMAKE_PATH" ] if [ -d "$CMAKE_PATH" ]
then then
for candidate in \ for candidate in \
@ -113,7 +114,7 @@ findCMake()
done done
fi fi
# check as file, include ThirdParty installation in the search # Check as file, include ThirdParty installation in the search
if [ -z "$foundExe" ] if [ -z "$foundExe" ]
then then
for candidate in \ for candidate in \
@ -137,9 +138,8 @@ findCMake()
then then
foundExe="$(cd ${foundExe%/cmake} 2>/dev/null && pwd)/cmake" foundExe="$(cd ${foundExe%/cmake} 2>/dev/null && pwd)/cmake"
fi fi
echo "Using cmake=$foundExe" 1>&2 echo "Using cmake=$foundExe" 1>&2
echo "$foundExe" echo $foundExe
return 0 return 0
else else
cat << NOT_FOUND 1>&2 cat << NOT_FOUND 1>&2
@ -150,26 +150,27 @@ NOT_FOUND
fi fi
fi fi
# Default to use the path, try resolving (so we know what we are using) # Default to use the path. Resolve so we know what we are using.
foundExe=$(command -v cmake 2> /dev/null) || foundExe=cmake foundExe=$(command -v cmake 2> /dev/null) || foundExe=false
echo "Using cmake=${foundExe:-NotFound}" 1>&2 echo "Using cmake=$foundExe" 1>&2
echo "${foundExe:-cmake}" echo $foundExe
} }
# #
# 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 #
# On success: return the resolved value as output.
# On failure: just report what is found in the path.
# #
unset QMAKE_PATH # clear when first loaded unset QMAKE_PATH # clear when first loaded
findQtMake() findQtMake()
{ {
local candidate local candidate foundExe
local foundExe
if [ -n "$QMAKE_PATH" ] if [ -n "$QMAKE_PATH" ]
then then
# check as directory # Check as directory
if [ -d "$QMAKE_PATH" ] if [ -d "$QMAKE_PATH" ]
then then
for candidate in \ for candidate in \
@ -185,7 +186,7 @@ findQtMake()
done done
fi fi
# check as file, include ThirdParty installation in the search # Check as file, include ThirdParty installation in the search
if [ -z "$foundExe" ] if [ -z "$foundExe" ]
then then
for candidate in \ for candidate in \
@ -209,9 +210,8 @@ findQtMake()
then then
foundExe="$(cd ${foundExe%/qmake} 2>/dev/null && pwd)/qmake" foundExe="$(cd ${foundExe%/qmake} 2>/dev/null && pwd)/qmake"
fi fi
echo "Using qmake=$foundExe" 1>&2 echo "Using qmake=$foundExe" 1>&2
echo "$foundExe" echo $foundExe
return 0 return 0
else else
cat << NOT_FOUND 1>&2 cat << NOT_FOUND 1>&2
@ -223,9 +223,9 @@ 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 qmake 2> /dev/null) || foundExe=qmake foundExe=$(command -v qmake 2> /dev/null) || foundExe=false
echo "Using qmake=${foundExe:-NotFound}" 1>&2 echo "Using qmake=$foundExe" 1>&2
echo "${foundExe:-qmake}" echo $foundExe
} }

View File

@ -2,7 +2,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) 2016 OpenCFD Ltd. # \\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd.
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -30,8 +30,13 @@
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Variables referenced by the functions. Initialization at the end of the file.
unset CMAKE_VARIABLES
# sourceBASE, buildBASE, installBASE defined in tools/ThirdPartyFunctions # sourceBASE, buildBASE, installBASE defined in tools/ThirdPartyFunctions
#------------------------------------------------------------------------------
# #
# Where things are or should be put # Where things are or should be put
# VTK_VERSION and VTK_MAJOR should already have been set # VTK_VERSION and VTK_MAJOR should already have been set
@ -75,8 +80,8 @@ setVtkDirs()
echo "VTK_BINARY_DIR=$VTK_BINARY_DIR" echo "VTK_BINARY_DIR=$VTK_BINARY_DIR"
echo "VTK_DIR=$VTK_DIR" echo "VTK_DIR=$VTK_DIR"
# Forcefully override the .git path for the VTK source code directory # Prevent git queries from using the ThirdParty repository
export GIT_DIR=$ParaView_SOURCE_DIR/.git export GIT_DIR=$VTK_SOURCE_DIR/.git
} }
@ -129,7 +134,7 @@ configVTK()
fi fi
mkdir -p $VTK_BINARY_DIR mkdir -p $VTK_BINARY_DIR
addCMakeVariable "CMAKE_BUILD_TYPE:STRING=$buildType" addCMakeVariable "CMAKE_BUILD_TYPE=$BUILD_TYPE"
cd $VTK_BINARY_DIR || exit 1 # change to build folder cd $VTK_BINARY_DIR || exit 1 # change to build folder
@ -139,12 +144,11 @@ configVTK()
echo " Source : $VTK_SOURCE_DIR" echo " Source : $VTK_SOURCE_DIR"
echo " Build : $VTK_BINARY_DIR" echo " Build : $VTK_BINARY_DIR"
echo " Target : $VTK_DIR" echo " Target : $VTK_DIR"
echo " Build type : $buildType" echo " cmake : $cmake"
echo " Cmake : $cmake"
echo "----" echo "----"
echo echo
echo "$cmake" \ echo "$cmake" \
-DCMAKE_INSTALL_PREFIX:PATH=$VTK_DIR \ -DCMAKE_INSTALL_PREFIX=$VTK_DIR \
$CMAKE_VARIABLES \ $CMAKE_VARIABLES \
$VTK_SOURCE_DIR $VTK_SOURCE_DIR
echo echo
@ -153,7 +157,7 @@ configVTK()
# Run cmake to create Makefiles # Run cmake to create Makefiles
$cmake \ $cmake \
-DCMAKE_INSTALL_PREFIX:PATH=$VTK_DIR \ -DCMAKE_INSTALL_PREFIX=$VTK_DIR \
$CMAKE_VARIABLES \ $CMAKE_VARIABLES \
$VTK_SOURCE_DIR $VTK_SOURCE_DIR
} }
@ -165,17 +169,14 @@ configVTK()
# #
makeVTK() makeVTK()
{ {
cd $VTK_BINARY_DIR || exit 1 # change to build folder cd $VTK_BINARY_DIR || exit 1 # Change to build folder
echo " Starting make" echo " Starting make"
time make -j $WM_NCOMPPROCS time make -j $WM_NCOMPPROCS
echo " Done make" echo " Done make"
# Remove lib if it is a link # Remove lib if it is a link
# (how this was previously handled before 'make install' worked) # (how this was previously handled before 'make install' worked)
if [ -L lib ] [ -L lib ] && rm -f lib 2>/dev/null
then
rm lib 2>/dev/null
fi
} }
@ -189,26 +190,20 @@ installVTK()
make install make install
cat<< INFO /bin/cat<<INFO
--- ====
Installation complete for vtk-$VTK_VERSION Installation complete for vtk-$VTK_VERSION as
VTK_DIR=$VTK_DIR VTK_DIR=$VTK_DIR
--- ====
INFO INFO
} }
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Clear the referenced variables before using any of the functions
unset CMAKE_VARIABLES
# Start with these general settings # Start with these general settings
addCMakeVariable "BUILD_SHARED_LIBS:BOOL=ON VTK_USE_RPATH:BOOL=OFF" addCMakeVariable "BUILD_SHARED_LIBS=ON" "BUILD_TESTING=OFF"
# Don't build test tree
addCMakeVariable "BUILD_TESTING:BOOL=OFF"
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

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) 2011-2016 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. # \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
# This file is part of OpenFOAM. # This file is part of OpenFOAM.
@ -56,34 +56,20 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
. etc/tools/ParaViewFunctions . etc/tools/ParaViewFunctions
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# #
# USER OPTIONS: # USER DEFAULTS:
# ~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~
# MPI support:
# use 0 or unset MPI_MAX_PROCS for no upper-limit
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: # MESA graphics support:
withMESA=false withMESA=false
MESA_INCLUDE="/usr/include/GL" MESA_INCLUDE="/usr/include/GL"
MESA_LIBRARY="/usr/lib$WM_COMPILER_LIB_ARCH/libOSMesa.so" MESA_LIBRARY="/usr/lib$WM_COMPILER_LIB_ARCH/libOSMesa.so"
# extra QT gui support (useful for some third party apps) # Python support:
withQT=true # - The script will try to determine the appropriate python library.
# If that fails, specify the path using the PYTHON_LIBRARY variable below.
# Set the path to the Qt-4.5 (or later) qmake if the system Qt is older withPYTHON=false
QMAKE_PATH="" PYTHON_LIBRARY=""
# PYTHON_LIBRARY="/usr/lib$WM_COMPILER_LIB_ARCH/libpython2.6.so.1.0"
# Set the path to cmake
CMAKE_PATH=""
# New rendering backend (starting with paraview 5.0). # New rendering backend (starting with paraview 5.0).
# Default to auto-config based on paraview version # Default to auto-config based on paraview version
@ -159,14 +145,6 @@ USAGE
[ -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:
#
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 # Set initial ParaView_MAJOR based on current value of ParaView_VERSION
setParaViewVersion ${ParaView_VERSION:-none} setParaViewVersion ${ParaView_VERSION:-none}
@ -175,7 +153,6 @@ setParaViewVersion ${ParaView_VERSION:-none}
# #
unset runPATCH runCONFIG runMAKE runINSTALL unset runPATCH runCONFIG runMAKE runINSTALL
runDEFAULT=true runDEFAULT=true
buildType=Release
# Parse options # Parse options
while [ "$#" -gt 0 ] while [ "$#" -gt 0 ]
@ -311,7 +288,7 @@ do
;; ;;
-buildType) -buildType)
[ "$#" -ge 2 ] || die "'$1' option requires an argument" [ "$#" -ge 2 ] || die "'$1' option requires an argument"
buildType="$2" BUILD_TYPE="$2"
shift shift
;; ;;
*) *)
@ -380,10 +357,10 @@ Features selected
qt ${withQT:-false} qt ${withQT:-false}
--------------------- ---------------------
Version information Version information
qt ${QtVersion:-none} qt ${QT_VERSION:-none}
version ${ParaView_VERSION:-unknown} $(checkVersion) version ${ParaView_VERSION:-unknown} $(checkVersion)
major ${ParaView_MAJOR:-unknown} major ${ParaView_MAJOR:-unknown}
build ${buildType:-Release} build ${BUILD_TYPE:-unknown}
--------------------- ---------------------
SUMMARY SUMMARY

22
makeVTK
View File

@ -3,7 +3,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) 2016 OpenCFD Ltd. # \\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd.
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -50,22 +50,14 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
. etc/tools/vtkFunctions . etc/tools/vtkFunctions
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# #
# USER OPTIONS: # USER DEFAULTS:
# ~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~
# MPI support:
# use 0 or unset MPI_MAX_PROCS for no upper-limit
withMPI=false
unset MPI_MAX_PROCS
# MESA graphics support: # MESA graphics support:
withMESA=false withMESA=false
MESA_INCLUDE="/usr/include/GL" MESA_INCLUDE="/usr/include/GL"
MESA_LIBRARY="/usr/lib$WM_COMPILER_LIB_ARCH/libOSMesa.so" MESA_LIBRARY="/usr/lib$WM_COMPILER_LIB_ARCH/libOSMesa.so"
# Set the path to cmake
CMAKE_PATH=""
# New rendering backend (starting with vtk 7?). # New rendering backend (starting with vtk 7?).
# Default to auto-config based on VTK version # Default to auto-config based on VTK version
withGL2=auto withGL2=auto
@ -85,10 +77,10 @@ options:
-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 with mpi (if not already enabled)
-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
-cmake PATH with cmake from the 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
@ -130,8 +122,6 @@ USAGE
# #
unset runPATCH runCONFIG runMAKE runINSTALL unset runPATCH runCONFIG runMAKE runINSTALL
runDEFAULT=true runDEFAULT=true
buildType=Release
withOSMESA=false
# Parse options # Parse options
while [ "$#" -gt 0 ] while [ "$#" -gt 0 ]
@ -236,7 +226,7 @@ do
;; ;;
-buildType) -buildType)
[ "$#" -ge 2 ] || die "'$1' option requires an argument" [ "$#" -ge 2 ] || die "'$1' option requires an argument"
buildType="$2" BUILD_TYPE="$2"
shift shift
;; ;;
*) *)
@ -306,7 +296,7 @@ Features selected
--------------------- ---------------------
Version information Version information
version ${VTK_VERSION:-unknown} version ${VTK_VERSION:-unknown}
build ${buildType:-Release} build ${BUILD_TYPE:-unknown}
--------------------- ---------------------
SUMMARY SUMMARY