CMake : <pthread.h> not found in Windows
As far as i know, Pthreads is not natively supported on windows platform. Unless you use some thing like
Windows only has win32 threads.
However, this is a project which provides pthreads on windows
Apparently the CMAKE_USE_WIN32_THREADS_INIT is useful in context of all platforms. This variable is generated or initialised on invocation of findPackage(Threads), ideally it handles linking issues on all platforms in case thread library is required to be linked with executable. Basically it generates appropriate thread library name on platform unix like platforms and is empty on platform such as windows where explicit threading library is not required for linking.Reference: CMake findThreads https://cmake.org/cmake/help/v3.0/module/FindThreads.html?highlight=threads