From acf1e3836ec1cc89996222fabe9458f1a56c1f52 Mon Sep 17 00:00:00 2001 From: Charles Gueunet Date: Fri, 17 Feb 2023 13:40:50 +0100 Subject: [PATCH] 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 --- CMakeLists.txt | 16 +++++++++++----- ...ake-fix.patch => VTK-49361a2-cmake-fix.patch} | 8 -------- ...ts.patch => VTK-49361a2-disable_traits.patch} | 0 ...361a2058784db4be05980476457c06d86890e7.tar.gz | 3 +++ tplMirror/VTK-9.1.0-duplicate-points-fix.patch | 10 ---------- tplMirror/VTK-9.1.0.tar.gz | 3 --- tplMirror/VTK-9.2.5.tar.gz | 3 +++ 7 files changed, 17 insertions(+), 26 deletions(-) rename tplMirror/{VTK-9.1.0-cmake-fix.patch => VTK-49361a2-cmake-fix.patch} (79%) rename tplMirror/{VTK-9.1.0-disable_traits.patch => VTK-49361a2-disable_traits.patch} (100%) create mode 100644 tplMirror/VTK-49361a2058784db4be05980476457c06d86890e7.tar.gz delete mode 100644 tplMirror/VTK-9.1.0-duplicate-points-fix.patch delete mode 100644 tplMirror/VTK-9.1.0.tar.gz create mode 100644 tplMirror/VTK-9.2.5.tar.gz diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a1badb7..b9d414fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1072,7 +1072,7 @@ endif() ################################ if( ENABLE_VTK ) set( VTK_DIR "${CMAKE_INSTALL_PREFIX}/vtk" ) - set( VTK_URL "${TPL_MIRROR_DIR}/VTK-9.1.0.tar.gz" ) + set( VTK_URL "${TPL_MIRROR_DIR}/VTK-49361a2058784db4be05980476457c06d86890e7.tar.gz" ) message( STATUS "Building VTK found at ${VTK_URL}" ) @@ -1082,6 +1082,12 @@ if( ENABLE_VTK ) # I'm no cmake expert and I do not know if there was a better way to deal with it. set( VTK_CMAKE_INSTALL_LIBDIR "lib" ) + # This compile option will enclose all of the VTK library within a vtk_geosx namespace. + # This mangling is needed in order to ensure that the VTK included with geosx does + # not interfere with another VTK version that may be linked dynamically at runtime + # (when using ParaView's Catalyst implementation for example). + set( VTK_ABI_NAMESPACE_NAME "vtk_geosx" ) + if( ENABLE_MPI ) set( VTK_C_COMPILER ${MPI_C_COMPILER} ) set( VTK_CXX_COMPILER ${MPI_CXX_COMPILER} ) @@ -1100,9 +1106,8 @@ endif( ENABLE_MPI ) PREFIX ${PROJECT_BINARY_DIR}/vtk URL ${VTK_URL} INSTALL_DIR ${VTK_DIR} - PATCH_COMMAND patch -p0 < ${TPL_MIRROR_DIR}/VTK-9.1.0-disable_traits.patch - COMMAND patch -p0 < ${TPL_MIRROR_DIR}/VTK-9.1.0-duplicate-points-fix.patch - COMMAND patch -p0 < ${TPL_MIRROR_DIR}/VTK-9.1.0-cmake-fix.patch + PATCH_COMMAND patch -p0 < ${TPL_MIRROR_DIR}/VTK-49361a2-disable_traits.patch + COMMAND patch -p0 < ${TPL_MIRROR_DIR}/VTK-49361a2-cmake-fix.patch BUILD_COMMAND ${TPL_BUILD_COMMAND} INSTALL_COMMAND "${TPL_INSTALL_COMMAND}" CMAKE_GENERATOR ${TPL_GENERATOR} @@ -1129,7 +1134,8 @@ endif( ENABLE_MPI ) -D VTK_MODULE_ENABLE_VTK_IOXML=YES -D VTK_MODULE_ENABLE_VTK_IOLegacy=YES -D VTK_BUILD_TESTING=OFF - -D VTK_LEGACY_REMOVE=ON ) + -D VTK_LEGACY_REMOVE=ON + -D VTK_ABI_NAMESPACE_NAME=${VTK_ABI_NAMESPACE_NAME} ) list( APPEND build_list vtk ) endif( ENABLE_VTK ) diff --git a/tplMirror/VTK-9.1.0-cmake-fix.patch b/tplMirror/VTK-49361a2-cmake-fix.patch similarity index 79% rename from tplMirror/VTK-9.1.0-cmake-fix.patch rename to tplMirror/VTK-49361a2-cmake-fix.patch index 7ffc4e06..3e6b6f63 100644 --- a/tplMirror/VTK-9.1.0-cmake-fix.patch +++ b/tplMirror/VTK-49361a2-cmake-fix.patch @@ -19,11 +19,3 @@ string(APPEND _MPI_${LANG}_LINK_FLAGS ">") endif () set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_LINK_OPTIONS "${_MPI_${LANG}_LINK_FLAGS}") -@@ -1823,7 +1824,6 @@ - find_package_handle_standard_args(MPI - REQUIRED_VARS ${_MPI_REQ_VARS} - VERSION_VAR ${_MPI_MIN_VERSION} -- REASON_FAILURE_MESSAGE "${_MPI_FAIL_REASON}" - HANDLE_COMPONENTS) - - #============================================================================= diff --git a/tplMirror/VTK-9.1.0-disable_traits.patch b/tplMirror/VTK-49361a2-disable_traits.patch similarity index 100% rename from tplMirror/VTK-9.1.0-disable_traits.patch rename to tplMirror/VTK-49361a2-disable_traits.patch diff --git a/tplMirror/VTK-49361a2058784db4be05980476457c06d86890e7.tar.gz b/tplMirror/VTK-49361a2058784db4be05980476457c06d86890e7.tar.gz new file mode 100644 index 00000000..ba440f00 --- /dev/null +++ b/tplMirror/VTK-49361a2058784db4be05980476457c06d86890e7.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:687942afef44f4408af59311402da3aed0d54644235f6db36f08db2462db04d4 +size 40697818 diff --git a/tplMirror/VTK-9.1.0-duplicate-points-fix.patch b/tplMirror/VTK-9.1.0-duplicate-points-fix.patch deleted file mode 100644 index 5ea9b6ca..00000000 --- a/tplMirror/VTK-9.1.0-duplicate-points-fix.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- Filters/ParallelDIY2/vtkRedistributeDataSetFilter.cxx 2022-03-08 00:35:31.589443296 -0800 -+++ Filters/ParallelDIY2/vtkRedistributeDataSetFilter.cxx.patched 2022-03-08 00:36:27.214917422 -0800 -@@ -518,6 +518,7 @@ - { - assert(vtkUnstructuredGrid::SafeDownCast(outputDO) != nullptr); - vtkNew appender; -+ appender->MergePointsOn(); - - using Opts = vtk::DataObjectTreeOptions; - for (vtkDataObject* part : vtk::Range(result.GetPointer(), diff --git a/tplMirror/VTK-9.1.0.tar.gz b/tplMirror/VTK-9.1.0.tar.gz deleted file mode 100644 index 09373933..00000000 --- a/tplMirror/VTK-9.1.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8fed42f4f8f1eb8083107b68eaa9ad71da07110161a3116ad807f43e5ca5ce96 -size 47871165 diff --git a/tplMirror/VTK-9.2.5.tar.gz b/tplMirror/VTK-9.2.5.tar.gz new file mode 100644 index 00000000..b46b4a57 --- /dev/null +++ b/tplMirror/VTK-9.2.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:128d601baa980e98ee034207974b33fb38d2c98ab9cf4a5756efdb09ed6c0949 +size 53807732