[vtk-developers] module question

Marcus D. Hanwell marcus.hanwell at kitware.com
Sun Nov 3 17:31:19 EST 2013


On Sun, Nov 3, 2013 at 5:06 PM, burlen <burlen.loring at gmail.com> wrote:
> how can I prevent a module if it depends on a class that won't be built? for
> eg. vtkRenderingTk contains classes for onscreen use and shouldn't be built
> if there's no onscreen render window available as in an OSMesa only build.

Why are you concerned about it being built if there isn't an onscreen
render window? Is this a concern for some of the tests, or some other
concern?
>
> I encountered this setting VTK_BUILD_ALL_MODULES with OSMesa only. I see
> that there's an EXCLUDE_FROM_ALL flag, however that would reduce the testing
> coverage of these classes, so I wanted to see if there was a way to make the
> module conditional.

EXCLUDE_FROM_ALL is a little arbitrary, but it effectively excludes
some modules when enable all modules is activated for modules with
unusual/difficult dependencies. It should be used very sparingly, we
actually want to have as few modules as possible excluded but this is
a useful convenience for setting up dashboards that want to test as
many things possible. Perhaps we should have a "really, enable EVERY
possible module"...
>
> I'm tempted to do this:
>
> # Rendering/Tk/module.cmake
> if (NOT VTK_OPENGL_HAS_OSMESA OR (VTK_USE_X OR VTK_USE_COCOA OR
> VTK_USE_CARBON))
>   vtk_module(vtkRenderingTk
>     GROUPS
>       Tk
>     DEPENDS
>       vtkRenderingOpenGL
>       vtkInteractionStyle
>       vtkInteractionImage
>     COMPILE_DEPENDS
>       vtkTclTk
>     TEST_DEPENDS
>       vtkRenderingVolume
>     EXCLUDE_FROM_WRAPPING
>     )
> endif()
>
> I doubt that's going to fly. is there a better solution?

One of the core goals of modularization was to reduce the arbitrary
changes in libraries, linking, API and other things based on build
settings. Does vtkRenderingTk do something in its tests, or overrides
or other that make you want to add this conditional?

Thanks,

Marcus



More information about the vtk-developers mailing list