-
- Downloads
Move implementation of vtkStringToken out of VTK.
This is so that tokens can be in a shared library even when VTK itself is a set of static libraries. A shared library is required in order for strings to be interned in an object held in a class-static variable. If this class is in a static library, a different instance of the class-static variable is created inside each library that links to the library. Keeping the library dynamic means a single instance is available to all consumers. Our new third-party token library provides a singleton class to prevent crashes due to (1) uncontrolled order of static data initialization in static libraries and (2) duplication of global objects when multiple libraries (e.g., B, C, D) link to a static library (e.g., A) with global symbols. Each downstream library (B, C, D) will refer to its own copy of A's globals on some platforms. + No files are installed that might conflict with a "system" token library. + Header files are all installed in `include/vtk-9.3/token` and the library is told to add `include/vtk-9.3` to the installed header search path (so that `#include <token/X>` will work the same on both build and installed versions). + The namespace used is vtktoken so it is possible to link both vtktoken and a system-provided token library into the same executable.
Showing
- .gitlab/ci/configure_fedora34_mpi_python_qt_tbb.cmake 1 addition, 0 deletions.gitlab/ci/configure_fedora34_mpi_python_qt_tbb.cmake
- Common/Core/CMakeLists.txt 0 additions, 1 deletionCommon/Core/CMakeLists.txt
- Common/Core/Testing/Cxx/TestStringToken.cxx 49 additions, 55 deletionsCommon/Core/Testing/Cxx/TestStringToken.cxx
- Common/Core/vtk.module 1 addition, 0 deletionsCommon/Core/vtk.module
- Common/Core/vtkStringManager.cxx 0 additions, 335 deletionsCommon/Core/vtkStringManager.cxx
- Common/Core/vtkStringToken.cxx 64 additions, 17 deletionsCommon/Core/vtkStringToken.cxx
- Common/Core/vtkStringToken.h 40 additions, 37 deletionsCommon/Core/vtkStringToken.h
- Common/DataModel/vtkCellGrid.cxx 2 additions, 3 deletionsCommon/DataModel/vtkCellGrid.cxx
- Common/DataModel/vtkCellGridEvaluator.cxx 1 addition, 2 deletionsCommon/DataModel/vtkCellGridEvaluator.cxx
- Common/DataModel/vtkCellMetadata.cxx 20 additions, 7 deletionsCommon/DataModel/vtkCellMetadata.cxx
- Common/DataModel/vtkCellMetadata.h 11 additions, 11 deletionsCommon/DataModel/vtkCellMetadata.h
- Documentation/release/dev/string-token-fix.md 20 additions, 0 deletionsDocumentation/release/dev/string-token-fix.md
- Filters/CellGrid/vtkDGCell.cxx 1 addition, 1 deletionFilters/CellGrid/vtkDGCell.cxx
- Filters/CellGrid/vtkUnstructuredGridToCellGrid.cxx 1 addition, 2 deletionsFilters/CellGrid/vtkUnstructuredGridToCellGrid.cxx
- IO/CellGrid/vtkCellGridWriter.cxx 1 addition, 2 deletionsIO/CellGrid/vtkCellGridWriter.cxx
- ThirdParty/token/CMakeLists.txt 18 additions, 0 deletionsThirdParty/token/CMakeLists.txt
- ThirdParty/token/update.sh 22 additions, 0 deletionsThirdParty/token/update.sh
- ThirdParty/token/vtk.module 7 additions, 0 deletionsThirdParty/token/vtk.module
- ThirdParty/token/vtktoken/CMakeLists.txt 29 additions, 0 deletionsThirdParty/token/vtktoken/CMakeLists.txt
- ThirdParty/token/vtktoken/cmake/CTestCustom.cmake.in 29 additions, 0 deletionsThirdParty/token/vtktoken/cmake/CTestCustom.cmake.in
Loading
Please register or sign in to comment