[vtk-developers] vtkMy build example

Michael Halle halazar at media.mit.edu
Thu Jan 17 09:17:18 EST 2002

I have just spent some time playing with the vtkMy build example in 
the 4.0 release.  Here are some observations that I've made.

First, thanks for the example.  It's pretty clear to me that very few
people who are not intimately familiar with the build process could
have done it.  It's a great service to us module writers.

Second, my general sense is that there's still too much to the process
for simple modules.  There's a lot of logic left in the various cmake
files.  To create a new module with a single class in it, I spent at
least half an hour changing the module name from vtkMy in all the
different files (and missing some at least three times).  I understand
that the flexibility is important for more complex modules, but the
existing system doesn't exactly make easy things easy.

(In counterpoint, however, once things work, they build flawlessly.)

Third, what are the chances that later VTK or cmake builds will change
the cmake logic contained in the vtkMy example files?  If there's a
significant chance that the module cmake files will break in later
releases, then I think that's an argument for factoring some of the
logic out and putting it in a non-module-specific, central location.

Is the need for so many VTKMY_ like cmake variables/parameters due to
a scoping limitation in cmake?  I know very little about cmake, but it
seems like some sort of local scoping would keep you from having to
prefix every variable in every module.

Without a local scoping option, it seems that if you want to automate
the process of naming a new module, like you'd have to run yet another
preprocessor step to substitute your name for a fixed pattern.  It would
work, and it would probably be straightforward, but I don't think
vtk really benefits from another step in the build process.

I'd certainly offer to help out in implementing a solution, but
(coming full circle) the build process is sufficiently complex that
it's quite hard for an outsider to figure out the important details
without intensive study.

Thanks for any comments you might have.

Michael Halle
mhalle at media.mit.edu

More information about the vtk-developers mailing list