[ITK-dev] [ITK] Installed External Module list

Lowekamp, Bradley (NIH/NLM/LHC) [C] blowekamp at mail.nih.gov
Tue Nov 15 14:42:17 EST 2016


OK,

Here is my test code:

set(op_mod "ITKReview")
find_package(ITK REQUIRED OPTIONAL_COMPONENTS ${op_mod})
message("ITK_${op_mod}_FOUND: ${ITK_${op_mod}_FOUND}”)

I’m running CMake 3.6.2. According to this documentation [1], I expect the above variable to be set if the component is available or not. Here the output:

ITK_ITKReview_FOUND: 

So it appears these per-component variables are not being set. I thought I’d first test this with an internal module before checking an installed external.

How do I optionally use ITK components? How do I know what components are available in an installed ITK?

Thanks,
Brad



[1] https://cmake.org/cmake/help/v3.0/manual/cmake-developer.7.html#module-documentation


> On Nov 15, 2016, at 2:07 PM, Lowekamp, Bradley (NIH/NLM/LHC) [C] <blowekamp at mail.nih.gov> wrote:
> 
> Matt,
> 
> Yes, that is the documented usage. I do that for the subdirectories where I am about to use the components [3,4]
> 
> But at the top-level, I am trying to ask what components are installed [1,2] so I know what options to turn on and how to control some aspects for the build process. How do I get a list of modules available?
> 
> I am now testing with find_package’s “OPTIONAL_COMPONENTS” to see what happens.
> 
> Thanks,
> Brad
> 
> [1] https://github.com/SimpleITK/SimpleITK/blob/master/CMakeLists.txt#L61-L83
> [2] https://github.com/SimpleITK/SimpleITK/blob/master/CMake/sitkCheckForITKModuleDependencies.cmake
> [3] https://github.com/SimpleITK/SimpleITK/blob/master/Code/IO/src/CMakeLists.txt#L14-L20
> [4] https://github.com/SimpleITK/SimpleITK/blob/master/Code/Common/src/CMakeLists.txt#L32-L34
> 
>> On Nov 15, 2016, at 1:40 PM, Matt McCormick <matt.mccormick at kitware.com> wrote:
>> 
>> Hi,
>> 
>> To require an external module, add it to the COMPONENTS argument of
>> find_package(ITK). For example,
>> 
>> find_package(ITK REQUIRED COMPONENTS AnExternalModule)
>> 
>> HTH,
>> Matt
>> 
>> On Tue, Nov 15, 2016 at 10:30 AM, Lowekamp, Bradley (NIH/NLM/LHC) [C]
>> <blowekamp at mail.nih.gov> wrote:
>>> Hi!
>>> 
>>> I am working on the SimpleITK Superbuid. I have install ITK to a directory, then I build an external ITK module, and install that too. All the headers are happily there and works just fine!
>>> 
>>> However, I would like to verify that the ITK install has the additional external ITK module. I expected it to be listed in ITK_MODULES_ENABLED, but it’s not. How can I detect if an external ITK module is installed?
>>> 
>>> Do we need to update the install behavior to support this?
>>> 
>>> Thanks,
>>> Brad
>>> 
>>> _______________________________________________
>>> Powered by www.kitware.com
>>> 
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>> 
>>> Kitware offers ITK Training Courses, for more information visit:
>>> http://kitware.com/products/protraining.php
>>> 
>>> Please keep messages on-topic and check the ITK FAQ at:
>>> http://www.itk.org/Wiki/ITK_FAQ
>>> 
>>> Follow this link to subscribe/unsubscribe:
>>> http://public.kitware.com/mailman/listinfo/insight-developers
> 
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.php
> 
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-developers
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community



More information about the Insight-developers mailing list