-
-
Notifications
You must be signed in to change notification settings - Fork 666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
COMP: VtkGlue module-Provide support for VTK new cmake targets #731
COMP: VtkGlue module-Provide support for VTK new cmake targets #731
Conversation
Since VTK 8.2, the CMake building system is now using more intensively the CMake targets system as proposed in "modern cmake". As a result, some CMake macros used in the old VTK have been removed and the vtkGlue module of ITK does not compile anymore. The provided fix should support both new and previous VTK versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The definition of macro(vtk_module_config ns)
seems to be repeated 3 times. Is this intentional? Why are the second and third definition needed?
the macro is repeated in the sections corresponding to If you look closely the macro code is written within a section enclosed by "". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent!
Closing the PR, thanks for the review. Hope the fix will work for others. BR |
I'll note that this approach is basically trying to keep the old API up-to-date rather than properly migrating to the new one. Since ITK aims to support both, maybe this is OK. I'll note that one thing missing here is |
I agree with you, ITK should eventually properly migrate to the new CMake modules architecture, modern cmake offers so much advantages. However users should be better educated at linking with only the modules they really need, many of us, included myself, were too used to include the ITK_USE_FILE and link with all the ITK libraries. Regarding the |
Rendering part of |
That failure means that autoinit macros were not generated, so |
I created an issue to track this. |
Indeed with the new VTK I had to add something like:
|
Since VTK 8.2, the CMake building system is now using more intensively the CMake
targets system as proposed in "modern cmake". As a result, some CMake macros
used in the old VTK have been removed and the vtkGlue module of ITK does not
compile anymore.
The provided fix should support both new and previous VTK versions.
PR Checklist
Refer to the ITK Software Guide for
further development details if necessary.