<div class="gmail_quote">On Wed, May 20, 2009 at 10:51 AM, 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>
Kind of you to let me decide ;-)<br>
<br>
But seriously, I posted this question, because I wanted to know whether<br>
this is the CMake-way of doing things. Not because I like to write the<br>
macro that way.<br>
<br>
In the end, maybe a larger community might want to use this macro. If<br>
so, then it would really help if it adheres to some (unwritten)<br>
standards.</blockquote><div><br>I suggest you avoid using COMPONENTS unless you're dealing with a package which is broken up into several components at least one of which is optional. I agree with Denis and Adolfo that you should use a variable to differentiate between the single and multithreaded versions of the library.<br>
<br>If you start using a list where you should be using a boolean, the end user is just going to end up being confused. You're also going to manufacture additional error conditions that you'll have to handle in your code.<br>
<br>If for some reason your goal is concurrent searching for single and multithreaded libraries so a user can use either in the same project (not sure why anyone would want to do this but I don't even know what FFTW stands for) you're far better off searching for both, i.e. FOO_ST_LIBRARY & FOO_MT_LIBRARY and then choosing which gets set in FOO_LIBRARIES via a boolean.<br>
</div></div><br>-- <br>Philip Lowman<br>