I think Dennis refers to setting cmake variables to define the use of multithreading, static, or debug libs (or single/double precision in your case). For example:<br><br><pre>set(Boost_USE_STATIC_LIBS ON)<br>set(Boost_USE_MULTITHREADED ON)<br>
find_package( Boost )<br></pre><div class="gmail_quote">I would also second the proposal of using such variables instead of components.<br><br>cheers,<br><br>Adolfo<br><br>On Wed, May 20, 2009 at 4:21 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 Denis,<br>
<br>
What do you mean with like FindBoost did? Can you be a bit more<br>
specific?<br>
<br>
Boost components are AFAIK independent of one another, and they're<br>
definitely not mutually exclusive, which is the case in my propsed setup<br>
of FindFFTW?<br>
<br>
For example:<br>
<br>
find_package(FFTW COMPONENTS single double)<br>
<br>
shoud be flagged as an error, because single and double are mutaully<br>
exclusive.<br>
<br>
Best regards,<br>
Marcel Loose.<br>
<div class="im"><br>
<br>
-----Original Message-----<br>
From: Marcel Loose <<a href="mailto:loose@astron.nl">loose@astron.nl</a>><br>
To: <a href="mailto:cmake@cmake.org">cmake@cmake.org</a><br>
Subject: [CMake] Abuse of find_package COMPONENTS, or not?<br>
Date: Wed, 20 May 2009 16:10:06 +0200<br>
<br>
Hi all,<br>
<br>
I am busy writing a FindFFTW macro. Depending on whether you want to use<br>
single or double precision you should include a different header file<br>
and link to a different library. The same is true when using<br>
parallelization like mpi or threads.<br>
<br>
Now I was considering to pass these options as COMPONENTS, since, AFAIK,<br>
that's the only way to pass parameters to a FindXXX macro.<br>
So, for example, the user of FindFFTW would do something like:<br>
<br>
find_package(FFTW COMPONENTS single threads)<br>
<br>
</div><div class="im">Do you guys consider this a good or a bad idea? If you think it's a bad<br>
idea, do you have a suggestion how to do things differently?<br>
<br>
</div>Best regards,<br>
<font color="#888888">Marcel Loose.<br>
</font><div><div></div><div class="h5"><br>
<br>
<br>
_______________________________________________<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>
_______________________________________________<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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Adolfo RodrÃguez Tsouroukdissian<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>