Updates will be applied on October 27th between 12pm - 12:45pm EDT (UTC-0400). Gitlab may be slow during the maintenance window.

Commit 6e113ad4 authored by Haocheng LIU's avatar Haocheng LIU
Browse files

Rewrite all public&private dependency in module.cmake file

The current dependency relationship in vtk is unclear and misleading.
This MR tries to rewrite them based on header files inclusion of headers
and source files in each module. Corner cases are considered and
modules are sorted in alphabetical order to facilitate future reference.
See details in my gitlab python based script project. In future we can continue
using this script to clean the VTK Dependency easily from
time to time.
parent 44b2711e
......@@ -2,12 +2,6 @@ if(NOT VTK_LEGACY_REMOVE)
vtk_module(vtkAcceleratorsDax
IMPLEMENTS
vtkFiltersCore
DEPENDS
vtkCommonCore
vtkCommonDataModel
vtkCommonExecutionModel
vtkFiltersCore
vtkFiltersGeometry
TEST_DEPENDS
vtkTestingCore
vtkTestingRendering
......@@ -17,5 +11,9 @@ if(NOT VTK_LEGACY_REMOVE)
vtkIOXML
vtkImagingSources
EXCLUDE_FROM_ALL
DEPENDS
vtkCommonCore
vtkCommonDataModel
vtkFiltersCore
)
endif()
endif()
\ No newline at end of file
if(NOT VTK_LEGACY_REMOVE)
vtk_module(vtkAcceleratorsPiston
DEPENDS
vtkCommonCore
vtkCommonDataModel
vtkCommonExecutionModel
vtkRenderingCore
vtkRenderingOpenGL
vtkIOImage #from piston
vtkImagingHybrid #from piston
TEST_DEPENDS
vtkTestingRendering
vtkInteractionStyle
......@@ -17,5 +9,11 @@ if(NOT VTK_LEGACY_REMOVE)
vtkParallelMPI
vtkRenderingParallel
EXCLUDE_FROM_ALL
DEPENDS
vtkCommonCore
vtkCommonDataModel
vtkCommonExecutionModel
vtkRenderingCore
vtkRenderingOpenGL
)
endif()
endif()
\ No newline at end of file
vtk_module(vtkChartsCore
GROUPS
StandAlone
DEPENDS
vtkRenderingContext2D
vtksys
PRIVATE_DEPENDS
vtkCommonColor
vtkInfovisCore # Needed for plot parallel coordinates vtkStringToCategory
TEST_DEPENDS
vtkTestingCore
vtkTestingRendering
......@@ -14,4 +8,16 @@ vtk_module(vtkChartsCore
vtkRenderingContext${VTK_RENDERING_BACKEND}
#vtkIOExport
vtkIOInfovis
)
DEPENDS
vtkCommonCore
vtkCommonDataModel
vtkFiltersGeneral
vtkRenderingContext2D
vtkRenderingCore
vtksys
PRIVATE_DEPENDS
vtkCommonColor
vtkCommonExecutionModel
vtkCommonTransforms
vtkInfovisCore
)
\ No newline at end of file
vtk_module(vtkCommonColor
DEPENDS
vtkCommonDataModel # For vtkColor
TEST_DEPENDS
vtkIOImage
vtkCommonExecutionModel
......@@ -10,4 +8,7 @@ vtk_module(vtkCommonColor
vtkInteractionStyle
KIT
vtkCommon
)
DEPENDS
vtkCommonCore
vtkCommonDataModel
)
\ No newline at end of file
vtk_module(vtkCommonComputationalGeometry
GROUPS
StandAlone
DEPENDS
vtkCommonSystem
vtkCommonMath
vtkCommonDataModel
TEST_DEPENDS
vtkTestingCore
vtkRendering${VTK_RENDERING_BACKEND}
KIT
vtkCommon
)
DEPENDS
vtkCommonCore
vtkCommonDataModel
)
\ No newline at end of file
vtk_module(vtkCommonCore
GROUPS
StandAlone
DEPENDS
vtkkwiml
PRIVATE_DEPENDS
vtksys
TEST_DEPENDS
vtkTestingCore
vtkCommonSystem
......@@ -12,4 +8,8 @@ vtk_module(vtkCommonCore
vtksys
KIT
vtkCommon
)
DEPENDS
vtkkwiml
PRIVATE_DEPENDS
vtksys
)
\ No newline at end of file
vtk_module(vtkCommonDataModel
GROUPS
StandAlone
DEPENDS
vtkCommonSystem
vtkCommonMath
vtkCommonMisc
vtkCommonTransforms
PRIVATE_DEPENDS
vtksys
TEST_DEPENDS
vtkTestingCore
vtkTestingRendering
......@@ -22,4 +15,12 @@ vtk_module(vtkCommonDataModel
vtkRendering${VTK_RENDERING_BACKEND}
KIT
vtkCommon
)
DEPENDS
vtkCommonCore
vtkCommonMath
vtkCommonTransforms
PRIVATE_DEPENDS
vtkCommonMisc
vtkCommonSystem
vtksys
)
\ No newline at end of file
vtk_module(vtkCommonExecutionModel
GROUPS
StandAlone
DEPENDS
vtkCommonDataModel
COMPILE_DEPENDS
vtkCommonMisc
TEST_DEPENDS
......@@ -13,4 +11,10 @@ vtk_module(vtkCommonExecutionModel
vtkIOLegacy
KIT
vtkCommon
)
DEPENDS
vtkCommonCore
vtkCommonDataModel
PRIVATE_DEPENDS
vtkCommonMisc
vtkCommonSystem
)
\ No newline at end of file
vtk_module(vtkCommonMath
DEPENDS
vtkCommonCore
TEST_DEPENDS
vtkTestingCore
vtkCommonSystem
vtkCommonTransforms
KIT
vtkCommon
)
DEPENDS
vtkCommonCore
)
\ No newline at end of file
vtk_module(vtkCommonMisc
GROUPS
StandAlone
DEPENDS
vtkCommonMath
TEST_DEPENDS
vtkTestingCore
KIT
vtkCommon
)
DEPENDS
vtkCommonCore
vtkCommonMath
)
\ No newline at end of file
vtk_module(vtkCommonSystem
GROUPS
StandAlone
TEST_DEPENDS
vtkTestingCore
KIT
vtkCommon
DEPENDS
vtkCommonCore
PRIVATE_DEPENDS
vtksys
TEST_DEPENDS
vtkTestingCore
KIT
vtkCommon
)
)
\ No newline at end of file
vtk_module(vtkCommonTransforms
GROUPS
StandAlone
DEPENDS
# Explicitely list (rather than transiently through
# vtkCommonMath) because it allows us to turn of wrapping
# of vtkCommonMath off but still satisfy API dependcy.
vtkCommonCore
vtkCommonMath
TEST_DEPENDS
vtkTestingCore
vtkRendering${VTK_RENDERING_BACKEND}
KIT
vtkCommon
)
DEPENDS
vtkCommonCore
vtkCommonMath
)
\ No newline at end of file
if(VTK_RENDERING_BACKEND STREQUAL "OpenGL2")
set(extra_opengl_depend vtkDomainsChemistry${VTK_RENDERING_BACKEND})
endif()
vtk_module(vtkDomainsChemistry
GROUPS
StandAlone
DEPENDS
vtkCommonDataModel
vtkRenderingCore
PRIVATE_DEPENDS
vtkIOXML
vtkFiltersSources
vtksys
TEST_DEPENDS
vtkIOGeometry
vtkIOLegacy
vtkTestingCore
vtkTestingRendering
vtkInteractionStyle
vtkRendering${VTK_RENDERING_BACKEND}
${extra_opengl_depend}
DEPENDS
vtkCommonCore
vtkCommonDataModel
vtkCommonExecutionModel
vtkIOLegacy
vtkIOXMLParser
vtkRenderingCore
PRIVATE_DEPENDS
vtkCommonTransforms
vtkFiltersCore
vtkFiltersGeneral
vtkFiltersSources
vtksys
)
vtk_module(vtkDomainsChemistryOpenGL2
TCL_NAME
vtkRenderingChemistryOpenGLII
DEPENDS
vtkRenderingOpenGL2
IMPLEMENTS
vtkDomainsChemistry
BACKEND
OpenGL2
IMPLEMENTATION_REQUIRED_BY_BACKEND
PRIVATE_DEPENDS
vtkglew
KIT
vtkOpenGL
TEST_DEPENDS
vtkIOGeometry
vtkTestingCore
vtkTestingRendering
vtkInteractionStyle
vtkRendering${VTK_RENDERING_BACKEND}
${extra_opengl_depend}
)
DEPENDS
vtkCommonCore
vtkDomainsChemistry
vtkRenderingOpenGL2
PRIVATE_DEPENDS
vtkCommonDataModel
vtkCommonExecutionModel
vtkCommonMath
vtkRenderingCore
vtkglew
)
\ No newline at end of file
vtk_module(vtkDomainsMicroscopy
DESCRIPTION "Readers and writers supporting whole slide images for microscopy domain"
DEPENDS
vtkCommonDataModel
vtkCommonExecutionModel
vtkIOImage
PRIVATE_DEPENDS
vtkIOXML
vtkFiltersSources
TEST_DEPENDS
vtkTestingCore
vtkTestingRendering
vtkInteractionImage
vtkRenderingContext${VTK_RENDERING_BACKEND}
EXCLUDE_FROM_ALL
)
DEPENDS
vtkIOImage
PRIVATE_DEPENDS
vtkCommonCore
vtkCommonDataModel
vtkCommonExecutionModel
)
\ No newline at end of file
......@@ -12,6 +12,7 @@ find_package(VTK COMPONENTS
vtkCommonCore
vtkIOLegacy
vtkIOXML
vtkIOGeometry
vtkTestingRendering
vtksys
)
......
vtk_module(vtkFiltersAMR
GROUPS
StandAlone
DEPENDS
vtkParallelCore
vtkFiltersGeneral
TEST_DEPENDS
vtkImagingCore
vtkIOAMR
......@@ -11,4 +8,14 @@ vtk_module(vtkFiltersAMR
vtkTestingRendering
KIT
vtkParallel
)
DEPENDS
vtkCommonDataModel
vtkCommonExecutionModel
PRIVATE_DEPENDS
vtkCommonCore
vtkCommonMath
vtkCommonSystem
vtkFiltersCore
vtkIOXML
vtkParallelCore
)
\ No newline at end of file
vtk_module(vtkFiltersCore
GROUPS
StandAlone
DEPENDS
vtkCommonExecutionModel
vtkCommonSystem
vtkCommonMisc
vtkCommonTransforms
vtkCommonMath
TEST_DEPENDS
vtkTestingRendering
vtkInteractionStyle
......@@ -18,4 +12,13 @@ vtk_module(vtkFiltersCore
vtkRenderingVolume${VTK_RENDERING_BACKEND}
KIT
vtkFilters
DEPENDS
vtkCommonCore
vtkCommonDataModel
vtkCommonExecutionModel
vtkCommonMisc
PRIVATE_DEPENDS
vtkCommonMath
vtkCommonSystem
vtkCommonTransforms
)
vtk_module(vtkFiltersExtraction
GROUPS
StandAlone
DEPENDS
vtkCommonDataModel
vtkCommonExecutionModel
vtkFiltersCore
vtkFiltersGeneral
vtkFiltersStatistics
TEST_DEPENDS
vtkIOLegacy
vtkIOXML
......@@ -15,4 +9,12 @@ vtk_module(vtkFiltersExtraction
vtkInteractionStyle
KIT
vtkFilters
)
DEPENDS
vtkCommonExecutionModel
vtkFiltersGeneral
PRIVATE_DEPENDS
vtkCommonCore
vtkCommonDataModel
vtkFiltersCore
vtkFiltersStatistics
)
\ No newline at end of file
vtk_module(vtkFiltersFlowPaths
GROUPS
StandAlone
DEPENDS
vtkCommonExecutionModel
vtkFiltersGeneral
vtkFiltersSources
vtkIOCore
TEST_DEPENDS
vtkFiltersAMR
vtkFiltersImaging
......@@ -13,4 +8,13 @@ vtk_module(vtkFiltersFlowPaths
vtkTestingRendering
vtkInteractionStyle
vtkRendering${VTK_RENDERING_BACKEND}
)
DEPENDS
vtkCommonCore
vtkCommonDataModel
vtkCommonExecutionModel
vtkCommonMath
PRIVATE_DEPENDS
vtkFiltersCore
vtkFiltersSources
vtkIOCore
)
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment