@@ -1072,7 +1072,7 @@ endif()
10721072################################
10731073if ( 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+
10851091if ( 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 )
11351141endif ( ENABLE_VTK )
0 commit comments