<br><br><div class="gmail_quote">On Mon, Dec 21, 2009 at 12:09 PM, Marcel Loose <span dir="ltr">&lt;<a href="mailto:loose@astron.nl">loose@astron.nl</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Adolfo,<br>
<br>
I think you already answered your question yourself, though maybe you<br>
didn&#39;t realize it. Fortunately you wrote the key phrase<br>
<br>
... Now if I clear all non-internal Boost_* cache variables ...<br>
<br>
The thing is, FindBoost keeps track of the components it has already<br>
found in internal variables named Boost_&lt;component&gt;_FOUND. So, if you<br>
don&#39;t remove these variables from the cache, you&#39;re entering the realm<br>
of undefined behaviour.<br></blockquote><div><br>Ack.<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
I don&#39;t know if the author(s) of FindBoost are to blame, e.g., for<br>
possible abuse of internal variables; or that you should never do what<br>
you did. I&#39;m more of a command-line person, so I have no experience with<br>
groups in the cmake-gui.<br></blockquote><div><br>For now, I guess it&#39;ll be the latter, to avoid causing undefined behavior. Thanks for confirming what&#39;s going on.<br><font color="#888888"><br>Adolfo.<br></font> <br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Best regards,<br>
Marcel Loose.<br>
<br>
<br>
On Mon, 2009-12-21 at 10:37 +0100, Adolfo Rodríguez Tsouroukdissian<br>
wrote:<br>
<div><div></div><div class="h5">&gt; Hi all,<br>
&gt;<br>
&gt; I have a use case where find_package(Boost COMPONENTS xxx) is called<br>
&gt; more than once, and each time with a different set of components, as<br>
&gt; in the following example:<br>
&gt;<br>
&gt;<br>
&gt; cmake_minimum_required(VERSION 2.6)<br>
&gt; project(MyBoost)<br>
&gt;<br>
&gt; find_package(Boost REQUIRED COMPONENTS date_time)<br>
&gt; message(STATUS &quot;1st call: Boost_LIBRARIES=${Boost_LIBRARIES}&quot;)<br>
&gt;<br>
&gt; find_package(Boost REQUIRED COMPONENTS regex)<br>
&gt; message(STATUS &quot;2nd call: Boost_LIBRARIES=${Boost_LIBRARIES}&quot;)<br>
&gt;<br>
&gt;<br>
&gt; Upon configuring the project for the first time, everything works as<br>
&gt; expected, and the relevant output I get is:<br>
&gt; -- 1st call: Boost_LIBRARIES=/opt/boost/lib/libboost_date_time-mt.so<br>
&gt; -- 2nd call:<br>
&gt; Boost_LIBRARIES=/opt/boost/lib/libboost_date_time-mt.so;/opt/boost/lib/libboost_regex-mt.so<br>
&gt;<br>
&gt;<br>
&gt; Now if I clear all non-internal Boost_* cache variables, such as by<br>
&gt; removing the Boost group in cmake-gui and reconfigure my project, I<br>
&gt; get<br>
&gt;<br>
&gt; -- 1st call: Boost_LIBRARIES=/opt/boost/lib/libboost_date_time-mt.so<br>
&gt; -- 2nd call: Boost_LIBRARIES=/opt/boost/lib/libboost_date_time-mt.so<br>
&gt;<br>
&gt;<br>
&gt; Which is unexpected. Should the above example work for the two<br>
&gt; described scenarios, or am I entering some state that yields undefined<br>
&gt; behavior?<br>
&gt;<br>
&gt; Thanks in advance,<br>
&gt;<br>
&gt; Adolfo<br>
&gt;<br>
&gt; --<br>
&gt; Adolfo Rodríguez Tsouroukdissian, Ph. D.<br>
&gt;<br>
&gt; Robotics engineer<br>
&gt; PAL ROBOTICS S.L<br>
&gt; <a href="http://www.pal-robotics.com" target="_blank">http://www.pal-robotics.com</a><br>
&gt; Tel. +34.93.414.53.47<br>
&gt; Fax.+34.93.209.11.09<br>
&gt; AVISO DE CONFIDENCIALIDAD: Este mensaje y sus documentos adjuntos,<br>
&gt; pueden contener información privilegiada y/o confidencial que está<br>
&gt; dirigida exclusivamente a su destinatario. Si usted recibe este<br>
&gt; mensaje y no es el destinatario indicado, o el empleado encargado de<br>
&gt; su entrega a dicha persona, por favor, notifíquelo inmediatamente y<br>
&gt; remita el mensaje original a la dirección de correo electrónico<br>
&gt; indicada. Cualquier copia, uso o distribución no autorizados de esta<br>
&gt; comunicación queda estrictamente prohibida.<br>
&gt;<br>
&gt; CONFIDENTIALITY NOTICE: This e-mail and the accompanying document(s)<br>
&gt; may contain confidential information which is privileged and intended<br>
&gt; only for the individual or entity to whom they are addressed.  If you<br>
&gt; are not the intended recipient, you are hereby notified that any<br>
&gt; disclosure, copying, distribution or use of this e-mail and/or<br>
&gt; accompanying document(s) is strictly prohibited.  If you have received<br>
&gt; this e-mail in error, please immediately notify the sender at the<br>
&gt; above e-mail address.<br>
</div></div>&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
<br>
</blockquote></div>