[vtk-developers] New module system preview

Ben Boeckel ben.boeckel at kitware.com
Mon Nov 12 11:12:13 EST 2018


On Fri, Nov 09, 2018 at 13:58:56 -0500, Jean-Christophe Fillion-Robin wrote:
> From a user perspective, I see remote module as in "VTK module source
> stored outside of VTK source tree" exactly the same way as regular module.
> Ideally, a "project" command as well as a "find_package(VTK ... )" with the
> expected dependency would be written in every VTK module. The only
> exception would be a "VTKCore" module providing the build system
> infrastructure.

OK, this is basically the same as my comment elsewhere in the thread
where deciding where to slice up VTK is done after landing the module
system. But, IMO, not something for this thread.

Personally, I'd rather just see modules inside VTK's source repo only
have one way to build (whether it be as part of VTK's main build or a
standalone `find_package(VTK)` and calling the module system on their
own). Those outside also only have one: `find_package(VTK)`. We're never
going to test all the combinations.

Note that `vtk_module_add_module` *only* works within `vtk_module_build`
call. This does *not* make a module:

```cmake
find_package(VTK COMPONENTS ...)
vtk_module_add_module(mymodule)
```

Well, it'd be possible to hack up all the properties and such that are
assumed, but I'm not going to document it because I don't want to have
to support all the internals in use outside of a single version of
`vtkModule.cmake`.

--Ben


More information about the vtk-developers mailing list