[cmake-developers] FindThreads_overhaul topic

Rolf Eike Beer eike at sf-mail.de
Wed Oct 8 11:37:40 EDT 2014


Am Mittwoch, 8. Oktober 2014, 10:54:12 schrieb Brad King:
> On 10/07/2014 12:18 PM, Rolf Eike Beer wrote:
> >>> +  add_library(CMake::Threads INTERFACE IMPORTED GLOBAL)
> > 
> > Both issues should be fixed now.
> 
> Thanks.  Your use of an interface target for this is a clever way
> of abstracting the differences between libraries and flags.  Nice.

All credits go to Timo Rothenpieler, I just refactored his changes and pushed 
this upstream.

> I'd rather reserve the CMake:: imported target namespace for future
> use.  The convention in other Find modules is to prefix the imported
> targets with the name of the package.  In this case we have no good
> name for the library within the namespace.  Here is a brainstorming
> list of possible names:
> 
>  Threads::Threads
>  Threads::Interface # my favorite
>  Threads::Native
>  Threads::System
> 
> Please pick one of these or propose your own and update the topic.

I'm not sure about Threads::Interface, it sounds so "generic" or "abstract" to 
me, but this target offers no abstraction of the thread API. All others have 
different up- and downsides, so I think I'll stay with Threads::Threads, that 
is the one that probably results in the least blame for a badly chosen name.

Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20141008/8b55d758/attachment-0002.sig>


More information about the cmake-developers mailing list