[vtk-developers] Checking if VTK was built with a particular group enabled

Marcus D. Hanwell marcus.hanwell at kitware.com
Fri May 4 10:51:04 EDT 2012


On Thu, May 3, 2012 at 5:21 PM, David Doria <daviddoria at gmail.com> wrote:
> On Thu, May 3, 2012 at 5:06 PM, David E DeMarle
> <dave.demarle at kitware.com> wrote:
>> The list of modules gets configured into the VTK_MODULES_ENABLED
>> variable defined in vtkConfig.cmake, where UseVTK.cmake should pick it
>> up from.
>>
>> David E DeMarle
>
> Sorry, I don't follow. Two things:
>
> 1) If I do this:
> 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?

You can check modules enabled, or if(TARGET vtkFiltersParallel).
>
> 2) There doesn't seem to be a similar VTK_GROUPS_ENABLED, or a way to
> check for them with CMake. Is that correct?
>
Groups shouldn't be used to indicate if a dependency is present, you
should check if the module is enabled. You can't link to a group, or
add it in the COMPONENTS argument.

Marcus



More information about the vtk-developers mailing list