The cmake partial output looks like this:

-- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed 
3

1 Answer

The lines

-- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found 

are output of a call like

find_package(Threads) 

This call is used in a script CMakeLists.txt by many CMake projects which want to use threads-related functionality (like pthread_create).

When process this call, CMake (by means of FindThreads.cmake script) tries to determine kind of thread support for the current platform.

The check Looking for pthread.h is self-explanatory: CMake checks whether header pthread.h exists and available.

The check Performing Test CMAKE_HAVE_LIBC_PTHREAD is about whether thread support functions are compiled into libc library directly, or one need to link additional libraries (like -lpthread).

The check Looking for pthread_create in pthreads tries to find pthreads library and function pthread_create in it.

The check Looking for pthread_create in pthread tries to find pthread library and function pthread_create in it.


That particular output could be interpreted as:

The platform supports threads by providing the header pthread.h and the library pthread.

This output is common for Unix-like systems. Despite "Failed" and "not found" words, this is perfectly good output.

7

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.