Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
ThirdParty-common
Commits
d75ec962
Commit
d75ec962
authored
Jun 14, 2016
by
mark
Browse files
ENH: add a patch mechanism for ParaView build
- this adds some flexiblity/robustness to the build
parent
b979e25f
Changes
5
Hide whitespace changes
Inline
Side-by-side
README.org
View file @
d75ec962
...
...
@@ -2,7 +2,7 @@
#
#+TITLE: OpenFOAM Third-Party packages
#+AUTHOR: The OpenFOAM Foundation
#+DATE:
31th May 2016
#+DATE:
2016-06-14
#+LINK: http://www.openfoam.org
#+OPTIONS: author:nil ^:{}
# Copyright (c) 2014-2016 OpenFOAM Foundation.
...
...
@@ -15,6 +15,8 @@
+ makeCmake (if the system cmake version is < 2.8.8)
+ makeParaView
*** Optional Build Components:
+ makeLLVM (Replaces makeGcc in the above description
- to use clang as compiler)
+ makeCCMIO (Only required for conversion of STAR-CCM+ meshes)
+ Allclean (Only required to save disk space)
* Versions and locations to download the third party packages
...
...
@@ -65,13 +67,21 @@
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
ThirdParty repository (see the etc/patches directory) and are applied
when building paraview.
*** Building ParaView-5.0.1 with gcc-6.1.0
***** Add support for gcc-6.?.?
The following cmake files
+ ParaView-5.0.1/VTK/CMake/vtkCompilerExtras.cmake
+ ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake
specifically limit the gcc versions supported. To add support gcc-6.?.?
replace '[345]' with '[3456]'
specifically limit the gcc versions supported.
To add support gcc-6.?.? replace the '[345]' with '[3456]'.
This patch is also supplied with the ThirdParty repository and
applied when building paraview.
***** SciberQuestToolKit
The SciberQuestToolKit plugin fails to compile with gcc-6.1.0 and causes
the compilation of ParaView to halt. The easiest solution is to delete
...
...
etc/patches/mkdiff-paraview-5.0.1
0 → 100644
View file @
d75ec962
#!/bin/sh
# simple script to generate patches
paraview
=
ParaView-5.0.1
for
i
in
\
$paraview
/VTK/CMake/vtkCompilerExtras.cmake
\
$paraview
/VTK/CMake/GenerateExportHeader.cmake
\
$paraview
/Qt/Components/CMakeLists.txt
\
;
do
diff
-uw
$i
.orig
$i
done
etc/patches/paraview-5.0.1
0 → 100644
View file @
d75ec962
--- 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
etc/tools/ParaViewFunctions
View file @
d75ec962
...
...
@@ -3,7 +3,7 @@
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation |
# \\/ M anipulation |
Copyright (C) 2016 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
...
...
@@ -364,6 +364,34 @@ addQtSupport()
}
#
# Apply source-code patch if possible
#
applyPatch
()
{
local
patch
=
"
$WM_THIRD_PARTY_DIR
/etc/patches/paraview-
$ParaView_VERSION
"
local
sentinel
=
"PATCHED_DURING_OPENFOAM_BUILD"
if
[
-r
"
$patch
"
]
then
(
cd
$ParaView_SOURCE_DIR
||
exit
1
if
[
-f
"
$sentinel
"
]
then
echo
"patch for paraview-
$ParaView_VERSION
was already applied"
else
echo
"apply patch for paraview-
$ParaView_VERSION
"
touch
"
$sentinel
"
patch
-p1
<
$patch
fi
)
else
echo
"no patch found for paraview-
$ParaView_VERSION
"
fi
}
#
# Configure via cmake, but don't actually build anything
#
...
...
makeParaView
View file @
d75ec962
...
...
@@ -4,7 +4,7 @@
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation |
# \\/ M anipulation |
Copyright (C) 2016 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
...
...
@@ -111,6 +111,7 @@ For example,
to add tests
For finer control, the build stages can be selected or deselected individually:
-patch -no-patch
-config -no-config
-make -no-make
-install -no-install
...
...
@@ -144,7 +145,7 @@ setVersion
#
# various building stages
#
unset
runCONFIG runMAKE runINSTALL
unset
runPATCH
runCONFIG runMAKE runINSTALL
runDEFAULT
=
true
buildType
=
Release
...
...
@@ -163,6 +164,15 @@ do
export
CXX
=
g++
# use g++
shift
;;
-patch
)
# stage 0: patch sources
runPATCH
=
true
unset
runDEFAULT
shift
;;
-no-patch
)
runPATCH
=
false
shift
;;
-config
)
# stage 1: config only
runCONFIG
=
true
unset
runDEFAULT
...
...
@@ -285,6 +295,7 @@ done
if
[
"
$runDEFAULT
"
=
true
]
then
:
${
runPATCH
:
=true
}
:
${
runCONFIG
:
=true
}
:
${
runMAKE
:
=true
}
:
${
runINSTALL
:
=true
}
...
...
@@ -309,6 +320,7 @@ cat<<SUMMARY
Build stages selected
---------------------
-patch
${
runPATCH
:-
false
}
-config
${
runCONFIG
:-
false
}
-make
${
runMAKE
:-
false
}
-install
${
runINSTALL
:-
false
}
...
...
@@ -328,6 +340,7 @@ $(checkVersion)
---------------------
SUMMARY
[
"
$runPATCH
"
=
true
]
&&
applyPatch
[
"
$runCONFIG
"
=
true
]
&&
configParaView
[
"
$runMAKE
"
=
true
]
&&
makeParaView
[
"
$runINSTALL
"
=
true
]
&&
installParaView
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment