[vtk-developers] module system / cmake changes?
Ben Boeckel
ben.boeckel at kitware.com
Thu Dec 28 11:25:18 EST 2017
On Thu, Dec 28, 2017 at 10:01:21 -0500, Isaiah Norton wrote:
> I've seen several comments recently about upcoming changes to VTK's modules
> and/or cmake system [1]. But I'm having trouble finding an
> issue/wiki/thread about these plans.
>
> Any suggestions? (or perhaps it's only a shared-intention for revamps made
> possible by CMake+compiler minimum-version bumps...)
The plans have mostly been internal discussions, sorry. The branch is
currently a work-in-progress. The commit history is a mess on the
current branch, but I'm working on making proper commits for it (I'm in
the middle of third-party stuff right now).
Basically the idea is to make VTK leverage the new features in CMake
since 3.0 with target-based logic rather than the old system's variable
slinging and such.
The core of it is here:
https://gitlab.kitware.com/ben.boeckel/vtk/blob/new-cmake-module/CMake/vtkModule.cmake
A simple(ish) module:
https://gitlab.kitware.com/ben.boeckel/vtk/blob/new-cmake-module/Common/DataModel/CMakeLists.txt
The new module file format (it is treated as a CMake argument block; no
logic allowed):
https://gitlab.kitware.com/ben.boeckel/vtk/blob/new-cmake-module/Common/DataModel/vtk.module
Language wrapping is also now done explicitly rather than implicitly
based on global variables. This means that VTK uses the wrapping logic
just as any other VTK-using library would:
https://gitlab.kitware.com/ben.boeckel/vtk/blob/new-cmake-module/CMakeLists.txt#L126
Documentation needs improvement, but it will get there before merging.
The plan is to extract it from the CMake files and dump it out for
Doxygen to put into the official docs.
Thanks,
--Ben
More information about the vtk-developers
mailing list