<div dir="ltr">Dirk, <div>Thanks for reporting.<div>Please see my comments below.<br><div class="gmail_extra">Let me know whether this clarifies.</div><div class="gmail_extra">Thanks.<br><br><div class="gmail_quote">On Fri, Oct 4, 2013 at 1:25 PM, Padfield, Dirk R (GE Global Research) <span dir="ltr"><<a href="mailto:padfield@research.ge.com" target="_blank">padfield@research.ge.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Developers,<br>
<br>
I have a quick ITK CMake question. In the file CMake/ITKModuleEnablement.cmake, we find the code<br>
<br>
# To maintain backward compatibility<br>
if(DEFINED ITK_BUILD_ALL_MODULES)<br>
message(WARNING "ITK_BUILD_ALL_MODULES is deprecated, please use ITK_BUILD_DEFAULT_MODULES.")<br>
set(ITK_BUILD_DEFAULT_MODULES ${ITK_BUILD_ALL_MODULES} CACHE BOOL "Build the default ITK modules." FORCE)<br>
endif()<br>
<br>
This has the following behavior:<br>
1) If ITK_BUILD_ALL_MODULES is set, ITK_BUILD_DEFAULT_MODULES is also set.<br>
2) When the user sees this warning, he/she may turn off ITK_BUILD_MODULES.<br></blockquote><div><b>>>> If you start from an existing build tree (which has the old cache entry of "ITK_BUILD_ALL_Modules"), yes, you would </b></div>
<div><b>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").</b></div>
<div><b><br></b></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
3) This also turns off the ITK_BUILD_DEFAULT_MODULES<br>
4) Since ITK_BUILD_ALL_MODULES is still DEFINED, the warning continues.<br>
5) If the user explicitly turns ITK_BUILD_DEFAULT_MODULES back on, it gets turned off again on the next compile<br>
6) The only way to get the expected behavior is to keep both of them on, but then the warning continues.<br>
<br>
I believe the intention was instead to use<br>
if(${ITK_BUILD_ALL_MODULES})<br>
<br>
In this case<br>
1) If ITK_BUILD_ALL_MODULES is set, it gives a warning and then sets ITK_BUILD_DEFAULT_MODULES<br>
2) The warning is only given when ITK_BUILD_ALL_MODULES is turned on<br>
3) If ITK_BUILD_ALL_MODULES is turned off, it has no effect on ITK_BUILD_DEFAULT_MODULES<br>
4) ITK_BUILD_DEFAULT_MODULES can be set when ITK_BUILD_ALL_MODULES is turned off<br>
<br>
Thoughts?<br>
<br>
Thanks,<br>
Dirk<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://kitware.com/products/protraining.php" target="_blank">http://kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-developers" target="_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><br></div><div><br></div>---------------------------------------------<br><b>Xiaoxiao Liu</b>, Ph.D.<div><div><div><font face="arial, sans-serif"><span style="border-collapse:collapse">R & D Engineer</span></font></div>
<div><div><a href="http://www.kitware.com/" target="_blank">Kitware Inc</a>.</div></div><div><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px">Clifton Park, NY</span><div><div>Phone: (518) 881-4924 or <span style="border-collapse:collapse;color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px">(518) 371-3971 x124</span></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif"><span style="line-height:31px;font-size:x-small"><br></span></font></div></div></div></div></div>
</div></div></div></div>