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.
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

Reply via email to