mirror of
https://develop.openfoam.com/Development/ThirdParty-common.git
synced 2025-12-08 06:57:50 +00:00
ENH: support new rendering backend for paraview >= 5.0
ENH: patch paraview 4.4.0 directly before building - this avoids more manual steps for the user
This commit is contained in:
19
README.org
19
README.org
@ -1,11 +1,12 @@
|
|||||||
# -*- mode: org; -*-
|
# -*- mode: org; -*-
|
||||||
#
|
#
|
||||||
#+TITLE: OpenFOAM Third-Party packages
|
#+TITLE: OpenFOAM Third-Party packages
|
||||||
#+AUTHOR: The OpenFOAM Foundation
|
#+AUTHOR: The OpenFOAM Foundation / OpenCFD Ltd.
|
||||||
#+DATE: 2016-06-14
|
#+DATE: 2016-06-19
|
||||||
#+LINK: http://www.openfoam.org
|
#+LINK: http://www.openfoam.org
|
||||||
#+OPTIONS: author:nil ^:{}
|
#+OPTIONS: author:nil ^:{}
|
||||||
# Copyright (c) 2014-2016 OpenFOAM Foundation.
|
# Copyright (c) 2014-2016 OpenFOAM Foundation.
|
||||||
|
# Copyright (c) 2016 OpenCFD Ltd.
|
||||||
|
|
||||||
* Description
|
* Description
|
||||||
Scripts for building third-party packages.
|
Scripts for building third-party packages.
|
||||||
@ -62,15 +63,12 @@
|
|||||||
does not exist and cannot be installed causing the build and installation to
|
does not exist and cannot be installed causing the build and installation to
|
||||||
fail.
|
fail.
|
||||||
|
|
||||||
Additionally for ParaView-4.4.0 there is a bug in the STL reader which can
|
Additionally for ParaView-4.4.0 there is a bug in the STL reader.
|
||||||
be patched by running the following command from within the ThirdParty-???
|
(see http://www.openfoam.org/mantisbt/view.php?id=1887).
|
||||||
directory:
|
|
||||||
+ wget https://raw.githubusercontent.com/Kitware/VTK/40937e934308e5009e80769dc0c451ee4f157749/IO/Geometry/vtkSTLReader.cxx -O ParaView-4.4.0/VTK/IO/Geometry/vtkSTLReader.cxx
|
|
||||||
See also http://www.openfoam.org/mantisbt/view.php?id=1887
|
|
||||||
|
|
||||||
For ParaView-5.0.1, the necessary patches are supplied with the
|
For ParaView-4.4.0 and ParaView-5.0.1,
|
||||||
ThirdParty repository (see the etc/patches directory) and are applied
|
the necessary patches are supplied with the ThirdParty repository
|
||||||
when building paraview.
|
(see the etc/patches directory) and are applied when building paraview.
|
||||||
|
|
||||||
*** Building ParaView-5.0.1 with gcc-6.1.0
|
*** Building ParaView-5.0.1 with gcc-6.1.0
|
||||||
***** Add support for gcc-6.?.?
|
***** Add support for gcc-6.?.?
|
||||||
@ -79,6 +77,7 @@
|
|||||||
+ ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake
|
+ ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake
|
||||||
specifically limit the gcc versions supported.
|
specifically limit the gcc versions supported.
|
||||||
To add support gcc-6.?.? replace the '[345]' with '[3456]'.
|
To add support gcc-6.?.? replace the '[345]' with '[3456]'.
|
||||||
|
|
||||||
This patch is also supplied with the ThirdParty repository and
|
This patch is also supplied with the ThirdParty repository and
|
||||||
applied when building paraview.
|
applied when building paraview.
|
||||||
|
|
||||||
|
|||||||
50
etc/patches/paraview-4.4.0
Normal file
50
etc/patches/paraview-4.4.0
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
--- ParaView-4.4.0/VTK/IO/Geometry/vtkSTLReader.cxx.orig 2015-09-11 19:59:24.000000000 +0200
|
||||||
|
+++ ParaView-4.4.0/VTK/IO/Geometry/vtkSTLReader.cxx 2016-06-19 12:59:50.769770143 +0200
|
||||||
|
@@ -448,7 +448,7 @@
|
||||||
|
done = done || (fscanf(fp,"%s", line)==EOF);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- if (!done)
|
||||||
|
+ else if (!done)
|
||||||
|
{
|
||||||
|
done = (fgets(line, 255, fp) == 0);
|
||||||
|
lineCount++;
|
||||||
|
--- ParaView-5.0.1/VTK/CMake/vtkCompilerExtras.cmake.orig 2016-03-28 17:07:10.000000000 +0200
|
||||||
|
+++ ParaView-5.0.1/VTK/CMake/vtkCompilerExtras.cmake 2016-06-11 15:10:14.820958942 +0200
|
||||||
|
@@ -32,7 +32,7 @@
|
||||||
|
OUTPUT_VARIABLE _gcc_version_info
|
||||||
|
ERROR_VARIABLE _gcc_version_info)
|
||||||
|
|
||||||
|
- string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]*"
|
||||||
|
+ string (REGEX MATCH "[3-6]\\.[0-9]\\.[0-9]*"
|
||||||
|
_gcc_version "${_gcc_version_info}")
|
||||||
|
if(NOT _gcc_version)
|
||||||
|
string (REGEX REPLACE ".*\\(GCC\\).*([34]\\.[0-9]).*" "\\1.0"
|
||||||
|
--- ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake.orig 2016-03-28 17:07:10.000000000 +0200
|
||||||
|
+++ ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake 2016-06-11 15:12:16.344357746 +0200
|
||||||
|
@@ -166,7 +166,7 @@
|
||||||
|
execute_process(COMMAND ${CMAKE_C_COMPILER} ARGS --version
|
||||||
|
OUTPUT_VARIABLE _gcc_version_info
|
||||||
|
ERROR_VARIABLE _gcc_version_info)
|
||||||
|
- string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]*"
|
||||||
|
+ string(REGEX MATCH "[3-6]\\.[0-9]\\.[0-9]*"
|
||||||
|
_gcc_version "${_gcc_version_info}")
|
||||||
|
# gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
|
||||||
|
# patch level, handle this here:
|
||||||
|
--- ParaView-5.0.1/Qt/Components/CMakeLists.txt.orig 2016-06-13 09:27:27.827849525 +0200
|
||||||
|
+++ ParaView-5.0.1/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
|
||||||
@ -394,6 +394,7 @@ configParaView()
|
|||||||
echo " MPI support : ${withMPI:-false}"
|
echo " MPI support : ${withMPI:-false}"
|
||||||
echo " Python support : ${withPYTHON:-false}"
|
echo " Python support : ${withPYTHON:-false}"
|
||||||
echo " MESA support : ${withMESA:-false}"
|
echo " MESA support : ${withMESA:-false}"
|
||||||
|
echo " GL2 rendering : false"
|
||||||
echo " Qt dev support : ${withQT:-false}"
|
echo " Qt dev support : ${withQT:-false}"
|
||||||
echo " Source : $ParaView_SOURCE_DIR"
|
echo " Source : $ParaView_SOURCE_DIR"
|
||||||
echo " Build : $ParaView_BINARY_DIR"
|
echo " Build : $ParaView_BINARY_DIR"
|
||||||
|
|||||||
@ -252,6 +252,18 @@ addMesaSupport()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# new rendering backend
|
||||||
|
#
|
||||||
|
addGL2Support()
|
||||||
|
{
|
||||||
|
if [ "${withGL2:=false}" = true ]
|
||||||
|
then
|
||||||
|
addCMakeVariable "VTK_RENDERING_BACKEND=OpenGL2"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
addQtSupport()
|
addQtSupport()
|
||||||
{
|
{
|
||||||
QtVersion=none
|
QtVersion=none
|
||||||
@ -405,6 +417,7 @@ configParaView()
|
|||||||
echo " MPI support : ${withMPI:-false}"
|
echo " MPI support : ${withMPI:-false}"
|
||||||
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 " Qt dev support : ${withQT:-false}"
|
echo " Qt dev support : ${withQT:-false}"
|
||||||
echo " Source : $ParaView_SOURCE_DIR"
|
echo " Source : $ParaView_SOURCE_DIR"
|
||||||
echo " Build : $ParaView_BINARY_DIR"
|
echo " Build : $ParaView_BINARY_DIR"
|
||||||
|
|||||||
@ -181,7 +181,7 @@ applyPatch()
|
|||||||
else
|
else
|
||||||
echo "apply patch for $pkg"
|
echo "apply patch for $pkg"
|
||||||
touch "$sentinel"
|
touch "$sentinel"
|
||||||
patch -p1 < $patch
|
patch -p1 < $patch 2>&1 | tee $sentinel
|
||||||
fi
|
fi
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
|
|||||||
20
makeParaView
20
makeParaView
@ -71,6 +71,12 @@ QMAKE_PATH=""
|
|||||||
# Set the path to cmake
|
# Set the path to cmake
|
||||||
CMAKE_PATH=""
|
CMAKE_PATH=""
|
||||||
|
|
||||||
|
# new rendering backend (starting with paraview 5.0)
|
||||||
|
withGL2=true
|
||||||
|
if [ "${ParaView_VERSION%%.*}" = 4 ]
|
||||||
|
then withGL2=false
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# NO FURTHER EDITING BELOW THIS LINE
|
# NO FURTHER EDITING BELOW THIS LINE
|
||||||
#
|
#
|
||||||
@ -85,6 +91,7 @@ usage() {
|
|||||||
usage: $Script [OPTION] [CMAKE-OPTION]
|
usage: $Script [OPTION] [CMAKE-OPTION]
|
||||||
options:
|
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)
|
||||||
-mesa with mesa (if not already enabled)
|
-mesa with mesa (if not already enabled)
|
||||||
-mpi with mpi (if not already enabled)
|
-mpi with mpi (if not already enabled)
|
||||||
-python with python (if not already enabled)
|
-python with python (if not already enabled)
|
||||||
@ -123,13 +130,17 @@ For finer control, the build stages can be selected or deselected individually:
|
|||||||
\$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION
|
\$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION
|
||||||
-> \$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-$ParaView_VERSION
|
-> \$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-$ParaView_VERSION
|
||||||
|
|
||||||
|
To change the paraview version, use the 'foamPV' command prior to '$Script'.
|
||||||
|
For example,
|
||||||
|
foamPV 4.4.0 ; ./makeParaview
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# ensure CMake gets the correct C++ compiler
|
# ensure CMake gets the correct C/C++ compiler
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
|
|
||||||
@ -197,6 +208,12 @@ do
|
|||||||
runINSTALL=true
|
runINSTALL=true
|
||||||
unset runDEFAULT
|
unset runDEFAULT
|
||||||
;;
|
;;
|
||||||
|
-gl2)
|
||||||
|
withGL2=true
|
||||||
|
;;
|
||||||
|
-no-gl2)
|
||||||
|
withGL2=false
|
||||||
|
;;
|
||||||
-mesa)
|
-mesa)
|
||||||
withMESA=true
|
withMESA=true
|
||||||
;;
|
;;
|
||||||
@ -290,6 +307,7 @@ addVerbosity # verbose makefiles
|
|||||||
addMpiSupport # set MPI-specific options
|
addMpiSupport # set MPI-specific options
|
||||||
addPythonSupport # set Python-specific options
|
addPythonSupport # set Python-specific options
|
||||||
addMesaSupport # set MESA-specific options
|
addMesaSupport # set MESA-specific options
|
||||||
|
addGL2Support # new rendering backend
|
||||||
addQtSupport # add extra Qt support
|
addQtSupport # add extra Qt support
|
||||||
|
|
||||||
setDirs # where things are or should be put
|
setDirs # where things are or should be put
|
||||||
|
|||||||
@ -121,13 +121,17 @@ For finer control, the build stages can be selected or deselected individually:
|
|||||||
\$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION
|
\$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION
|
||||||
-> \$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-$ParaView_VERSION
|
-> \$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-$ParaView_VERSION
|
||||||
|
|
||||||
|
To make a different paraview version, use the 'foamPV' command prior to '$Script'.
|
||||||
|
For example,
|
||||||
|
foamPV 3.14.0 ; ./makeParaview
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# ensure CMake gets the correct C++ compiler
|
# ensure CMake gets the correct C/C++ compiler
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user