cmake: split vtkm_filter into common|extra|contour|gradient
closes: #504 (closed)
There is a limitation in Windows builds using VS2019 where libraries cannot be bigger than 4GiB. This is normally not an issue but in VTKm
due to its strong template usage libraries can reach that size.
The VTKm
filter library is can easily reach that size and it will halt the build
This MR tries to avoid reaching those sizes for now by splitting the filter library into four smaller libraries.
The proposal scheme is:
It splits vtkm-filter into ->
- vtkm-common (Classes that are dependencies of other filter libs)
- vtkm-contour (Contour class and its instantiations)
- vtkm-gradient (Gradient class and its instantiations)
- vtkm-extra (Classes other than Contour or Gradient that are not dependencies)
Windows filter libraries sizes:
Libraries | Current | this MR |
---|---|---|
vtkm-filters | 1.3 GB | - |
vtkm-common | - | 308 MB |
vtkm-extra | - | 424 MB |
vtkm-contour | - | 639 MB |
vtkm-gradient | - | 422 MB |
Along this new filter sublibraries new exports
headers are now generated as seen here:
→ find . -iname '*export.h'
./include/vtkm/cont/vtkm_cont_export.h
./include/vtkm/source/vtkm_source_export.h
./include/vtkm/worklet/vtkm_worklet_export.h
./include/vtkm/filter/vtkm_filter_extra_export.h
./include/vtkm/filter/vtkm_filter_common_export.h
./include/vtkm/filter/vtkm_filter_gradient_export.h
./include/vtkm/filter/vtkm_filter_contour_export.h
./include/vtkm/rendering/vtkm_rendering_export.h
./include/vtkm/io/vtkm_io_export.h
Edited by Vicente Bolea