[cmake-developers] FindThreads_overhaul topic

Rolf Eike Beer eike at sf-mail.de
Tue Oct 7 12:18:56 EDT 2014


Am Dienstag, 7. Oktober 2014, 10:35:24 schrieb Brad King:
> Eike,
> 
> This fails on a few dashboard machines:
> 
>  http://open.cdash.org/testDetails.php?test=286158250&build=3519076
>  CMake Error at /.../Modules/FindThreads.cmake:207 (add_library):
>    add_library cannot create imported target "CMake::Threads" because
> another target with the same name already exists.
> 
> Instead of using a variable like HAVE_CMAKE_THREADS_TARGET,
> just test for the target.  Look at FindOpenGL for an example:
> 
>  if(OPENGL_FOUND)
>    if(NOT TARGET OpenGL::GL)
>      add_library(OpenGL::GL UNKNOWN IMPORTED)
> 
> > +  add_library(CMake::Threads INTERFACE IMPORTED GLOBAL)
> 
> The imported target should not be GLOBAL.

Both issues should be fixed now.

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/20141007/de069cad/attachment-0002.sig>


More information about the cmake-developers mailing list