CMake Warning:
Manually-specified variables were not used by the project:
VTK_MODULE_ENABLE_VTK_vtkDICOM
If I run cmake again the warning is gone and I can use vtkDicom as expected.
Since I am building vtk-9.2.2 automatized I actually don’t want to call cmake twice.
Can someone tell me what I am doing wrong? Is my cmake command wrong? Or is this the desired way of building vtk-9.2.2 with remote modules?
The problem is caused because Remote/vtkDICOM.remote.cmake does this:
vtk_fetch_module(vtkDICOM ...)
when it should do this, since vtk.module for vtkDICOM refers to itself as VTK::DICOM:
vtk_fetch_module(DICOM ...)
It’s surprising this discrepancy has existed for so long (ever since vtkDICOM became a remote module, I believe).
So until this is fixed, you will have to continue to set both of those CMake variables and ignore the cmake warning. Or you can locally patch Remote/vtkDICOM.remote.cmake.
So I’m wrong in my understanding that VTK_MODULE_ENABLE_VTK_DICOM enables the internal dicom module in vtk? I guess I can cleanup this cmake command a little.
Do you have any explanation why this changed from v9.0.2 to v9.2.2? As I understand, vtkDICOM was already a remote module in 9.0.2, wasn’t it?
My understanding is that VTK_MODULE_ENABLE_VTK_vtkDICOM causes cmake to grab the vtkDICOM code via git, and that VTK_MODULE_ENABLE_VTK_DICOM enables the module. So I don’t think you’re wrong.
I don’t think this has changed at all between v9.0 and v9.2, so I can’t explain any differences you’re seeing (I can look into this, but not today unfortunately). Is there any chance that you are using a different version of CMake for your v9.2.2 build as compared to when you were building v9.0.2?