[vtk-developers] VTK Modular Directory Structure

Marcus D. Hanwell marcus.hanwell at kitware.com
Mon Mar 19 16:51:10 EDT 2012


On Mon, Mar 19, 2012 at 4:34 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> One last comment on the vtk modular directory structure.
>
> I understand there is no need for src and include directories for each
> module. ITK's use of templates justifies them, but VTK has a simpler
> structure.
>
> But, at the top level, why not keep all of the modules under a Modules
> directory like we do in ITK. This unclutters the top level directory
> and makes it clear which directories are part of the modularization.

We discussed this at length when the process began, and decided on two
levels. I know you asked about this last year when ITK was still using
ITK/ITK/module/leveltwo, and we didn't intend to use it back then. I
personally disagree that having a container directory unclutters
things, and was never involved in the ITK decision to require such a
container directory.

We were aiming to only change the directory structure where necessary,
the third party and utility code is all using the same module syntax
to declare dependencies too, i.e. Utilities/ParseOGLExt/module.cmake,
ThirdParty/png/module.cmake and Common/Core/module.cmake are all at
the same level and all declare dependencies between the modules. The
logic could be extended to look for module.cmake at multiple levels if
required.
>
> This is certainly NOT a deal breaker. I'm just curious about the
> decision, especially since Kitware was responsible for the ITK modular
> organization.
>
These were a few of the design decisions we made early on, we never
expected to be constrained by ITK decisions but as you know I have
kept up on what they have done, we are sharing significant amounts of
CMake code and logic although we have had to extend/adapt this quite a
bit to deal with the fact that VTK is a very different project.

There are always concerns with path length on the Windows compilers,
which having a very deep structure makes us more likely to hit,
especially as VTK is used in several other projects another level or
two in. I think minimizing the divergence from what developers are
used to is more valuable than uncluttering the top level, and that was
part of our original discussion as I remember it. There is of course a
certain amount of subjectivity in that assessment though.

Marcus



More information about the vtk-developers mailing list