[vtk-developers] Checking if VTK was built with a particular group enabled
Brad King
brad.king at kitware.com
Fri May 4 10:55:53 EDT 2012
On Fri, May 4, 2012 at 9:36 AM, David E DeMarle <dave.demarle at kitware.com> wrote:
> FIND_PACKAGE(VTK)
> IF(VTK_FOUND)
> include(${ParaView_BINARY_DIR}/VTK/VTKConfig.cmake)
> ENDIF()
The find_package command includes VTKConfig automatically. That is
how it knows the package is found.
> Then checking $VTK_MODULES_ENABLED for vtkFiltersParallel.
One can do this after find_package(VTK) but the below should work.
> I don't see a way to get the list of groups that are enabled.
The groups are only a convenience for enabling a bunch of modules.
Applications should look for modules, not groups.
On 5/3/2012 5:21 PM, David Doria wrote:
> find_package(VTK REQUIRED vtkFiltersParallel)
> include(${VTK_USE_FILE})
>
> even though Module_vtkFiltersParallel is OFF, CMake does not complain,
> but then I get a linker error (correctly) "cannot find
> -lvtkFiltersParallel". Shouldn't this be caught by the find_package?
Yes. Normally the above should report an error
No such module: vtkFiltersParallel
but the test for it is broken in the case that vtkFiltersParallel
was enabled in the same build tree in the past and is now disabled.
This should fix it:
http://review.source.kitware.com/#/t/551
-Brad
More information about the vtk-developers
mailing list