<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello,<div><br></div><div>Was a patch ever created for this?</div><div><br></div><div>What about if the ITK_BUILD_ALL_MODULES variable was deleted/unset after producing the warning?</div><div><br></div><div>Brad</div><div><br></div><div><div><div>On Oct 10, 2013, at 10:14 AM, Xiaoxiao Liu <<a href="mailto:xiaoxiao.liu@kitware.com">xiaoxiao.liu@kitware.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><div dir="ltr">Hi Dirk, <div><br></div><div>If we change <span style="font-family:arial,sans-serif;font-size:12.727272033691406px">from</span></div><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">if(DEFINED ITK_BUILD_ALL_MODULES)</span><br style="font-family:arial,sans-serif;font-size:12.727272033691406px">
<span style="font-family:arial,sans-serif;font-size:12.727272033691406px">to</span><br style="font-family:arial,sans-serif;font-size:12.727272033691406px"><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">if(${ITK_BUILD_ALL_MODULES}), as you suggested, </span><br>
</div><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">and allow users to turn </span><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">${ITK_BUILD_ALL_MODULES} OFF while keep ${ITK_BUILD_DEFAULT_MODULES} being OFF. It might be confusing as well, because suddenly you have both </span><span style="font-family:arial,sans-serif">CMake variables in your CMake Cache for the same purpose but with contradicting</span><span style="font-family:arial,sans-serif"> values.</span></div>
<div><span style="font-family:arial,sans-serif"><br></span></div><div><span style="font-family:arial,sans-serif">The purpose of the warning is to inform people that they should not use </span><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">ITK_BUILD_ALL_MODULES any more. So here is a patch to prompt with </span></div>
<div><font face="arial, sans-serif">clearer message to remove it from the CMake Cache:</font></div><div><font face="arial, sans-serif"><br></font></div><div><a href="http://review.source.kitware.com/#/c/12975/">http://review.source.kitware.com/#/c/12975/</a><br>
</div><div><br></div><div>Please let me know whether it make sense.</div><div>Thanks!</div><div><br></div><div><br></div><div>-Xiaoxiao</div><div><span style="font-family:arial,sans-serif"><br></span></div><div><br></div>
<div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 7, 2013 at 10:20 AM, 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 Xiaoxiao,<br>
<br>
Thanks for the explanation. I imagine that many users will have existing trees and will be thrown off by the behavior listed below. Would there be any negative consequences to changing<br>
<br>
from<br>
if(DEFINED ITK_BUILD_ALL_MODULES)<br>
to<br>
if(${ITK_BUILD_ALL_MODULES})<br>
<br>
The latter seems more intuitive to me and also seems to behave better (according to the behavior I listed below). It doesn't matter much to me either way, but I thought it might matter to users.<br>
<br>
Thanks,<br>
Dirk<br>
<br>
<br>
________________________________<br>
From: Xiaoxiao Liu [<a href="mailto:xiaoxiao.liu@kitware.com">xiaoxiao.liu@kitware.com</a>]<br>
Sent: Friday, October 04, 2013 2:30 PM<br>
To: Padfield, Dirk R (GE Global Research)<br>
Cc: <<a href="mailto:insight-developers@itk.org">insight-developers@itk.org</a>> Developers<br>
Subject: Re: [Insight-developers] ITK_BUILD_ALL_MODULES and ITK_BUILD_DEFAULT_MODULES<br>
<div class="im"><br>
Dirk,<br>
Thanks for reporting.<br>
Please see my comments below.<br>
Let me know whether this clarifies.<br>
Thanks.<br>
<br>
</div><div><div class="h5">On Fri, Oct 4, 2013 at 1:25 PM, Padfield, Dirk R (GE Global Research) <<a href="mailto:padfield@research.ge.com">padfield@research.ge.com</a><mailto:<a href="mailto:padfield@research.ge.com">padfield@research.ge.com</a>>> wrote:<br>
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>
>>> If you start from an existing build tree (which has the old cache entry of "ITK_BUILD_ALL_Modules"), yes, you would<br>
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").<br>
<br>
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>
</div></div>Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><<a href="http://www.kitware.com/" target="_blank">http://www.kitware.com</a>><br>
<div class="im"><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>
<br>
<br>
<br>
--<br>
<br>
<br>
---------------------------------------------<br>
Xiaoxiao Liu, Ph.D.<br>
R & D Engineer<br>
</div>Kitware Inc<<a href="http://www.kitware.com/" target="_blank">http://www.kitware.com/</a>>.<br>
<div class="HOEnZb"><div class="h5">Clifton Park, NY<br>
Phone: <a href="tel:%28518%29%20881-4924" value="+15188814924">(518) 881-4924</a> or <a href="tel:%28518%29%20371-3971%20x124" value="+15183713971">(518) 371-3971 x124</a><br>
<br>
</div></div></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><font face="arial, sans-serif">R & D Engineer</font></div>
<div><a href="http://www.kitware.com/" target="_blank">Kitware Inc</a>.</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>
_______________________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br>http://kitware.com/products/protraining.php<br><br>Please keep messages on-topic and check the ITK FAQ at:<br>http://www.itk.org/Wiki/ITK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.itk.org/mailman/listinfo/insight-developers<br></blockquote></div><br></div></body></html>