Hi all,<br><br>I have a use case where find_package(Boost COMPONENTS xxx) is called more than once, and each time with a different set of components, as 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><div class="h5">
<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 expected, and the relevant output I get is:<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;/opt/boost/lib/libboost_regex-mt.so<br><br><br>Now if I clear all non-internal Boost_* cache variables, such as by removing the Boost group in cmake-gui and reconfigure my project, I get<br>
</div>-- 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 described scenarios, or am I entering some state that yields undefined behavior?<br>
<br>Thanks in advance,<br><br>Adolfo<br clear="all"><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">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, pueden contener información privilegiada y/o confidencial que está dirigida exclusivamente a su destinatario. Si usted recibe este mensaje y no es el destinatario indicado, o el empleado encargado de su entrega a dicha persona, por favor, notifíquelo inmediatamente y remita el mensaje original a la dirección de correo electrónico indicada. Cualquier copia, uso o distribución no autorizados de esta comunicación queda estrictamente prohibida.<br>
<br>CONFIDENTIALITY NOTICE: This e-mail and the accompanying document(s) may contain confidential information which is privileged and intended only for the individual or entity to whom they are addressed. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of this e-mail and/or accompanying document(s) is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender at the above e-mail address.<br>