[Insight-developers] ITK_BUILD_ALL_MODULES and ITK_BUILD_DEFAULT_MODULES

Xiaoxiao Liu xiaoxiao.liu at kitware.com
Fri Oct 4 14:30:45 EDT 2013


Dirk,
Thanks for reporting.
Please see my comments below.
Let me know whether this clarifies.
Thanks.

On Fri, Oct 4, 2013 at 1:25 PM, Padfield, Dirk R (GE Global Research) <
padfield at research.ge.com> wrote:

> Hi Developers,
>
> I have a quick ITK CMake question.  In the file
> CMake/ITKModuleEnablement.cmake, we find the code
>
> # To maintain backward compatibility
> if(DEFINED ITK_BUILD_ALL_MODULES)
>   message(WARNING "ITK_BUILD_ALL_MODULES is deprecated, please use
> ITK_BUILD_DEFAULT_MODULES.")
>   set(ITK_BUILD_DEFAULT_MODULES ${ITK_BUILD_ALL_MODULES} CACHE BOOL "Build
> the default ITK modules." FORCE)
> endif()
>
> This has the following behavior:
> 1) If ITK_BUILD_ALL_MODULES is set, ITK_BUILD_DEFAULT_MODULES is also set.
> 2) When the user sees this warning, he/she may turn off ITK_BUILD_MODULES.
>
*>>> If you start from an existing build tree (which has the old cache
entry of "ITK_BUILD_ALL_Modules"), yes, you would *
*see this warning. To remove this warning (without cleaninig the entire
CMake Cache),  instead of turning OFF "ITK_BUILD_ALL_Modules",  you could
just remove it from the CMake cache (on CMake GUI, select the variable and
hit "Delete").*
*
*

> 3) This also turns off the ITK_BUILD_DEFAULT_MODULES
> 4) Since ITK_BUILD_ALL_MODULES is still DEFINED, the warning continues.
> 5) If the user explicitly turns ITK_BUILD_DEFAULT_MODULES back on, it gets
> turned off again on the next compile
> 6) The only way to get the expected behavior is to keep both of them on,
> but then the warning continues.
>
> I believe the intention was instead to use
> if(${ITK_BUILD_ALL_MODULES})
>
> In this case
> 1) If ITK_BUILD_ALL_MODULES is set, it gives a warning and then sets
> ITK_BUILD_DEFAULT_MODULES
> 2) The warning is only given when ITK_BUILD_ALL_MODULES is turned on
> 3) If ITK_BUILD_ALL_MODULES is turned off, it has no effect on
> ITK_BUILD_DEFAULT_MODULES
> 4) ITK_BUILD_DEFAULT_MODULES can be set when ITK_BUILD_ALL_MODULES is
> turned off
>
> Thoughts?
>
> Thanks,
> Dirk
> _______________________________________________
> 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://www.itk.org/mailman/listinfo/insight-developers
>



-- 


---------------------------------------------
*Xiaoxiao Liu*, Ph.D.
R & D Engineer
Kitware Inc <http://www.kitware.com/>.
Clifton Park, NY
Phone: (518) 881-4924  or  (518) 371-3971 x124
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-developers/attachments/20131004/d8354456/attachment.htm>


More information about the Insight-developers mailing list