Skip to content

Commit 0fdc45f

Browse files
CharlesGueunetJulien Fausty
authored andcommitted
VTK: update to master and add mangling
Mangling VTK uses an inline namespace to change the VTK symbols in the binary so as to allow multiple VTK binaries to coexist
1 parent 6a2a41e commit 0fdc45f

7 files changed

+17
-26
lines changed

CMakeLists.txt

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ endif()
10721072
################################
10731073
if( ENABLE_VTK )
10741074
set( VTK_DIR "${CMAKE_INSTALL_PREFIX}/vtk" )
1075-
set( VTK_URL "${TPL_MIRROR_DIR}/VTK-9.1.0.tar.gz" )
1075+
set( VTK_URL "${TPL_MIRROR_DIR}/VTK-49361a2058784db4be05980476457c06d86890e7.tar.gz" )
10761076

10771077
message( STATUS "Building VTK found at ${VTK_URL}" )
10781078

@@ -1082,6 +1082,12 @@ if( ENABLE_VTK )
10821082
# I'm no cmake expert and I do not know if there was a better way to deal with it.
10831083
set( VTK_CMAKE_INSTALL_LIBDIR "lib" )
10841084

1085+
# This compile option will enclose all of the VTK library within a vtk_geosx namespace.
1086+
# This mangling is needed in order to ensure that the VTK included with geosx does
1087+
# not interfere with another VTK version that may be linked dynamically at runtime
1088+
# (when using ParaView's Catalyst implementation for example).
1089+
set( VTK_ABI_NAMESPACE_NAME "vtk_geosx" )
1090+
10851091
if( ENABLE_MPI )
10861092
set( VTK_C_COMPILER ${MPI_C_COMPILER} )
10871093
set( VTK_CXX_COMPILER ${MPI_CXX_COMPILER} )
@@ -1100,9 +1106,8 @@ endif( ENABLE_MPI )
11001106
PREFIX ${PROJECT_BINARY_DIR}/vtk
11011107
URL ${VTK_URL}
11021108
INSTALL_DIR ${VTK_DIR}
1103-
PATCH_COMMAND patch -p0 < ${TPL_MIRROR_DIR}/VTK-9.1.0-disable_traits.patch
1104-
COMMAND patch -p0 < ${TPL_MIRROR_DIR}/VTK-9.1.0-duplicate-points-fix.patch
1105-
COMMAND patch -p0 < ${TPL_MIRROR_DIR}/VTK-9.1.0-cmake-fix.patch
1109+
PATCH_COMMAND patch -p0 < ${TPL_MIRROR_DIR}/VTK-49361a2-disable_traits.patch
1110+
COMMAND patch -p0 < ${TPL_MIRROR_DIR}/VTK-49361a2-cmake-fix.patch
11061111
BUILD_COMMAND ${TPL_BUILD_COMMAND}
11071112
INSTALL_COMMAND "${TPL_INSTALL_COMMAND}"
11081113
CMAKE_GENERATOR ${TPL_GENERATOR}
@@ -1129,7 +1134,8 @@ endif( ENABLE_MPI )
11291134
-D VTK_MODULE_ENABLE_VTK_IOXML=YES
11301135
-D VTK_MODULE_ENABLE_VTK_IOLegacy=YES
11311136
-D VTK_BUILD_TESTING=OFF
1132-
-D VTK_LEGACY_REMOVE=ON )
1137+
-D VTK_LEGACY_REMOVE=ON
1138+
-D VTK_ABI_NAMESPACE_NAME=${VTK_ABI_NAMESPACE_NAME} )
11331139

11341140
list( APPEND build_list vtk )
11351141
endif( ENABLE_VTK )

tplMirror/VTK-9.1.0-cmake-fix.patch renamed to tplMirror/VTK-49361a2-cmake-fix.patch

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,3 @@
1919
string(APPEND _MPI_${LANG}_LINK_FLAGS ">")
2020
endif ()
2121
set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_LINK_OPTIONS "${_MPI_${LANG}_LINK_FLAGS}")
22-
@@ -1823,7 +1824,6 @@
23-
find_package_handle_standard_args(MPI
24-
REQUIRED_VARS ${_MPI_REQ_VARS}
25-
VERSION_VAR ${_MPI_MIN_VERSION}
26-
- REASON_FAILURE_MESSAGE "${_MPI_FAIL_REASON}"
27-
HANDLE_COMPONENTS)
28-
29-
#=============================================================================
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:687942afef44f4408af59311402da3aed0d54644235f6db36f08db2462db04d4
3+
size 40697818

tplMirror/VTK-9.1.0-duplicate-points-fix.patch

Lines changed: 0 additions & 10 deletions
This file was deleted.

tplMirror/VTK-9.1.0.tar.gz

Lines changed: 0 additions & 3 deletions
This file was deleted.

tplMirror/VTK-9.2.5.tar.gz

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:128d601baa980e98ee034207974b33fb38d2c98ab9cf4a5756efdb09ed6c0949
3+
size 53807732

0 commit comments

Comments
 (0)