<div dir="ltr"><div class="gmail_extra">Hello,<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div class="gmail_extra">
<br><div class="gmail_quote"><div><div>I've got a question about some logic in CMake's find_package_handle_standard_args function, specifically the fact that it considers a nonexistent / empty string version to be a version that acceptably matches the required version.</div>


<div><br></div><div>The logic is:</div><div>* call find_package_handle_standard_args(... VERSION_VAR "" ...)</div><div>* at <a href="http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/FindPackageHandleStandardArgs.cmake;hb=HEAD#l286" target="_blank">FindPackageHandleStandardArgs.cmake:286</a>, the VERSION_OK variable is set to a default value of TRUE</div>


<div>* at 287, the value of the argument following VERSION_VAR is set into VERSION</div><div>* at 309, if VERSION is undefined or an empty string, the else() branch is taken</div><div>* from 309-318, an error message is set, but VERSION_OK is never made FALSE</div>


<div>* at 325, since VERSION_OK is still TRUE, the logic proceeds with setting ${package_name}_FOUND to TRUE</div><div><br></div><div>Is this the intended behavior (and if so, why?) or a bug?<br></div>
<div><br></div><div>Thanks,</div><div>Brian</div></div></div><span class="HOEnZb"><font color="#888888"><br>-- <br>Brian Helba<br>Medical Imaging<br>Kitware, Inc.<br>
</font></span></div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>Brian Helba<br>Medical Imaging<br>Kitware, Inc.<br>
</div></div>