CONFIG: update paraview patch for paraview-5.1.0

ENH: include ThirdParty platforms when searching for cmake
This commit is contained in:
mark
2016-07-14 08:56:53 +02:00
parent f3ef77b946
commit c20c2c2509
3 changed files with 105 additions and 47 deletions

View File

@ -0,0 +1,17 @@
--- ParaView-5.1.0/Qt/Components/CMakeLists.txt.orig 2016-06-13 09:27:27.827849525 +0200
+++ ParaView-5.1.0/Qt/Components/CMakeLists.txt 2016-06-13 09:29:28.599318445 +0200
@@ -656,10 +656,10 @@
#the pqSGExportStateWizard has subclasses that directly access
#the UI file, and currently we don't have a clean way to break this hard
#dependency, so for no we install this ui file.
-if(PARAVIEW_INSTALL_DEVELOPMENT_FILES)
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h"
- DESTINATION "${VTK_INSTALL_INCLUDE_DIR}")
-endif()
+#OPENFOAM patch#if(PARAVIEW_INSTALL_DEVELOPMENT_FILES)
+#OPENFOAM patch# install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h"
+#OPENFOAM patch# DESTINATION "${VTK_INSTALL_INCLUDE_DIR}")
+#OPENFOAM patch#endif()
#IF (NOT PV_INSTALL_NO_DEVELOPMENT)
# # Headers

View File

@ -279,29 +279,49 @@ addQtSupport()
addCMakeVariable "PARAVIEW_BUILD_QT_GUI=ON" addCMakeVariable "PARAVIEW_BUILD_QT_GUI=ON"
unset qmakeExe local candidate
local foundExe
if [ -n "$QMAKE_PATH" ] if [ -n "$QMAKE_PATH" ]
then then
# check as directory
if [ -d "$QMAKE_PATH" ] if [ -d "$QMAKE_PATH" ]
then then
if [ -x "$QMAKE_PATH/qmake" ] for candidate in \
then $QMAKE_PATH/qmake \
qmakeExe=$QMAKE_PATH/qmake $QMAKE_PATH/bin/qmake \
elif [ -x "$QMAKE_PATH/bin/qmake" ] ;
then do
qmakeExe=$QMAKE_PATH/bin/qmake if [ -f "$candidate" -a -x "$candidate" ]
fi then
elif [ -x "$QMAKE_PATH" ] foundExe=$candidate
then break
qmakeExe=$QMAKE_PATH fi
done
fi fi
if [ -n "$qmakeExe" ] # check as file, include ThirdParty installation in the search
if [ -z "$foundExe" ]
then
for candidate in \
$QMAKE_PATH \
$installBASE/$QMAKE_PATH/bin/qmake \
$installBASE/qt-$QMAKE_PATH/bin/qmake \
;
do
if [ -f "$candidate" -a -x "$candidate" ]
then
foundExe=$candidate
break
fi
done
fi
if [ -n "$foundExe" ]
then then
# Use absolute path # Use absolute path
if [ "${qmakeExe#/}" = "$qmakeExe" ] if [ "${foundExe#/}" = "$foundExe" ]
then then
qmakeExe="$(cd ${qmakeExe%/qmake} 2>/dev/null && pwd)/qmake" foundExe="$(cd ${foundExe%/qmake} 2>/dev/null && pwd)/qmake"
fi fi
else else
echo echo
@ -312,21 +332,21 @@ addQtSupport()
fi fi
fi fi
# Default to using qmake from the path # Fallback to qmake from the path
if [ -n "$qmakeExe" ] if [ -n "$foundExe" ]
then then
addCMakeVariable "QT_QMAKE_EXECUTABLE:FILEPATH=$qmakeExe" addCMakeVariable "QT_QMAKE_EXECUTABLE:FILEPATH=$foundExe"
else else
qmakeExe=qmake foundExe=qmake
fi fi
# Check qmake can be found # Check qmake can be found
if type $qmakeExe >/dev/null 2>&1 if type $foundExe >/dev/null 2>&1
then then
# Check the Qt version selected # Check the Qt version selected
# parse -> "Using Qt version X.Y.Z in ..." # parse -> "Using Qt version X.Y.Z in ..."
QtVersion=$($qmakeExe -query QT_VERSION) QtVersion=$($foundExe -query QT_VERSION)
# Split Major.Minor.Revision - could also use IFS hacking # Split Major.Minor.Revision - could also use IFS hacking
set -- $(echo "$QtVersion" | sed -e 's/\./ /g') set -- $(echo "$QtVersion" | sed -e 's/\./ /g')
@ -364,29 +384,49 @@ patchParaView()
# #
configParaView() configParaView()
{ {
unset cmakeExe local candidate
local foundExe
if [ -n "$CMAKE_PATH" ] if [ -n "$CMAKE_PATH" ]
then then
# check as directory
if [ -d "$CMAKE_PATH" ] if [ -d "$CMAKE_PATH" ]
then then
if [ -x "$CMAKE_PATH/cmake" ] for candidate in \
then $CMAKE_PATH/cmake \
cmakeExe=$CMAKE_PATH/cmake $CMAKE_PATH/bin/cmake \
elif [ -x "$CMAKE_PATH/bin/cmake" ] ;
then do
cmakeExe=$CMAKE_PATH/bin/cmake if [ -f "$candidate" -a -x "$candidate" ]
fi then
elif [ -x "$CMAKE_PATH" ] foundExe=$candidate
then break
cmakeExe=$CMAKE_PATH fi
done
fi fi
if [ -n "$cmakeExe" ] # check as file, include ThirdParty installation in the search
if [ -z "$foundExe" ]
then
for candidate in \
$CMAKE_PATH \
$installBASE/$CMAKE_PATH/bin/cmake \
$installBASE/cmake-$CMAKE_PATH/bin/cmake \
;
do
if [ -f "$candidate" -a -x "$candidate" ]
then
foundExe=$candidate
break
fi
done
fi
if [ -n "$foundExe" ]
then then
# Use absolute path # Use absolute path
if [ "${cmakeExe#/}" = "$cmakeExe" ] if [ "${foundExe#/}" = "$foundExe" ]
then then
cmakeExe="$(cd ${cmakeExe%/cmake} 2>/dev/null && pwd)/cmake" foundExe="$(cd ${foundExe%/cmake} 2>/dev/null && pwd)/cmake"
fi fi
else else
echo echo
@ -397,11 +437,8 @@ configParaView()
fi fi
fi fi
# Default to using cmake from the path # Fallback to cmake from the path
if [ -z "$cmakeExe" ] [ -n "$foundExe" ] || foundExe=cmake
then
cmakeExe=cmake
fi
# Remove any existing build folder and recreate # Remove any existing build folder and recreate
if [ -d $ParaView_BINARY_DIR ] if [ -d $ParaView_BINARY_DIR ]
@ -427,9 +464,10 @@ configParaView()
echo " Build : $ParaView_BINARY_DIR" echo " Build : $ParaView_BINARY_DIR"
echo " Target : $ParaView_DIR" echo " Target : $ParaView_DIR"
echo " Build type : $buildType" echo " Build type : $buildType"
echo " Cmake : $foundExe"
echo "----" echo "----"
echo echo
echo "$cmakeExe" \ echo "$foundExe" \
-DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \ -DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \
$CMAKE_VARIABLES \ $CMAKE_VARIABLES \
$ParaView_SOURCE_DIR $ParaView_SOURCE_DIR
@ -438,7 +476,7 @@ configParaView()
echo echo
# Run cmake to create Makefiles # Run cmake to create Makefiles
$cmakeExe \ $foundExe \
-DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \ -DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \
$CMAKE_VARIABLES \ $CMAKE_VARIABLES \
$ParaView_SOURCE_DIR $ParaView_SOURCE_DIR
@ -476,9 +514,12 @@ installParaView()
make install make install
cat<< INFO cat<< INFO
--- ---
Installation complete for paraview-$ParaView_VERSION Installation complete for paraview-$ParaView_VERSION
Now update the environment by running: ParaView_DIR=$ParaView_DIR
You may need to update the OpenFOAM environment by running:
wmREFRESH wmREFRESH
--- ---
INFO INFO

View File

@ -237,12 +237,12 @@ do
;; ;;
-mesa-include) -mesa-include)
[ "$#" -ge 2 ] || die "'$1' option requires an argument" [ "$#" -ge 2 ] || die "'$1' option requires an argument"
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"
MESA_LIBRARY="$2" MESA_LIBRARY="${2%%/}"
shift shift
;; ;;
-mpi) -mpi)
@ -259,17 +259,17 @@ do
;; ;;
-python-lib) -python-lib)
[ "$#" -ge 2 ] || die "'$1' option requires an argument" [ "$#" -ge 2 ] || die "'$1' option requires an argument"
PYTHON_LIBRARY="$2" PYTHON_LIBRARY="${2%%/}"
shift shift
;; ;;
-cmake) -cmake)
[ "$#" -ge 2 ] || die "'$1' option requires an argument" [ "$#" -ge 2 ] || die "'$1' option requires an argument"
CMAKE_PATH=$2 CMAKE_PATH="${2%%/}"
shift shift
;; ;;
-qmake) -qmake)
[ "$#" -ge 2 ] || die "'$1' option requires an argument" [ "$#" -ge 2 ] || die "'$1' option requires an argument"
QMAKE_PATH=$2 QMAKE_PATH="${2%%/}"
shift shift
;; ;;
-qt) -qt)