<br><br><div class="gmail_quote">On Mon, Dec 21, 2009 at 12:09 PM, Marcel Loose <span dir="ltr"><<a href="mailto:loose@astron.nl">loose@astron.nl</a>></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'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_<component>_FOUND. So, if you<br>
don't remove these variables from the cache, you'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'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'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'll be the latter, to avoid causing undefined behavior. Thanks for confirming what'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">> Hi all,<br>
><br>
> I have a use case where find_package(Boost COMPONENTS xxx) is called<br>
> more than once, and each time with a different set of components, as<br>
> in the following example:<br>
><br>
><br>
> cmake_minimum_required(VERSION 2.6)<br>
> project(MyBoost)<br>
><br>
> find_package(Boost REQUIRED COMPONENTS date_time)<br>
> message(STATUS "1st call: Boost_LIBRARIES=${Boost_LIBRARIES}")<br>
><br>
> find_package(Boost REQUIRED COMPONENTS regex)<br>
> message(STATUS "2nd call: Boost_LIBRARIES=${Boost_LIBRARIES}")<br>
><br>
><br>
> Upon configuring the project for the first time, everything works as<br>
> expected, and the relevant output I get is:<br>
> -- 1st call: Boost_LIBRARIES=/opt/boost/lib/libboost_date_time-mt.so<br>
> -- 2nd call:<br>
> Boost_LIBRARIES=/opt/boost/lib/libboost_date_time-mt.so;/opt/boost/lib/libboost_regex-mt.so<br>
><br>
><br>
> Now if I clear all non-internal Boost_* cache variables, such as by<br>
> removing the Boost group in cmake-gui and reconfigure my project, I<br>
> get<br>
><br>
> -- 1st call: Boost_LIBRARIES=/opt/boost/lib/libboost_date_time-mt.so<br>
> -- 2nd call: Boost_LIBRARIES=/opt/boost/lib/libboost_date_time-mt.so<br>
><br>
><br>
> Which is unexpected. Should the above example work for the two<br>
> described scenarios, or am I entering some state that yields undefined<br>
> behavior?<br>
><br>
> Thanks in advance,<br>
><br>
> Adolfo<br>
><br>
> --<br>
> Adolfo Rodríguez Tsouroukdissian, Ph. D.<br>
><br>
> Robotics engineer<br>
> PAL ROBOTICS S.L<br>
> <a href="http://www.pal-robotics.com" target="_blank">http://www.pal-robotics.com</a><br>
> Tel. +34.93.414.53.47<br>
> Fax.+34.93.209.11.09<br>
> AVISO DE CONFIDENCIALIDAD: Este mensaje y sus documentos adjuntos,<br>
> pueden contener información privilegiada y/o confidencial que está<br>
> dirigida exclusivamente a su destinatario. Si usted recibe este<br>
> mensaje y no es el destinatario indicado, o el empleado encargado de<br>
> su entrega a dicha persona, por favor, notifíquelo inmediatamente y<br>
> remita el mensaje original a la dirección de correo electrónico<br>
> indicada. Cualquier copia, uso o distribución no autorizados de esta<br>
> comunicación queda estrictamente prohibida.<br>
><br>
> CONFIDENTIALITY NOTICE: This e-mail and the accompanying document(s)<br>
> may contain confidential information which is privileged and intended<br>
> only for the individual or entity to whom they are addressed. If you<br>
> are not the intended recipient, you are hereby notified that any<br>
> disclosure, copying, distribution or use of this e-mail and/or<br>
> accompanying document(s) is strictly prohibited. If you have received<br>
> this e-mail in error, please immediately notify the sender at the<br>
> above e-mail address.<br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> 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>
><br>
> 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>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
<br>
</blockquote></div>