[Piglit] [PATCH 12/13] cmake: Check for pthreads

Chad Versace chad.versace at linux.intel.com
Thu Mar 27 10:51:41 PDT 2014


On Thu, Mar 27, 2014 at 08:08:50AM -0700, Jose Fonseca wrote:
> I think it would be more portable to use FindThreads module that comes with cmake. e.g.:
> 
>   find_package (Threads)
> 
>   target_link_libraries (my_program
>     ${CMAKE_THREAD_LIBS_INIT}
>   )
> 
>   if (CMAKE_USE_PTHREADS_INIT)
>     add_definitions(-DPIGLIT_HAS_PTHREADS)
>   endif ()

Thanks for the suggestion. I should've done my research before before
handrolling my own pthreads detectcion.

I'll use your code snippet in v2 of the series.


More information about the Piglit mailing list