Clarify in the docs what belongs in portability/
[folly.git] / CMake / FindPThread.cmake
1 # - Try to find libpthread
2 #
3 # Once done this will define
4 #
5 #  LIBPTHREAD_FOUND - system has libpthread
6 #  LIBPTHREAD_INCLUDE_DIRS - the libpthread include directory
7 #  LIBPTHREAD_LIBRARIES - Link these to use libpthread
8 #  LIBPTHREAD_DEFINITIONS - Compiler switches required for using libpthread
9 #
10 #  Redistribution and use is allowed according to the terms of the New
11 #  BSD license.
12 #  For details see the accompanying COPYING-CMAKE-SCRIPTS file.
13 #
14
15
16 if (LIBPTHREAD_LIBRARIES AND LIBPTHREAD_INCLUDE_DIRS)
17   set (LIBPTHREAD_FIND_QUIETLY TRUE)
18 endif (LIBPTHREAD_LIBRARIES AND LIBPTHREAD_INCLUDE_DIRS)
19
20 find_path (LIBPTHREAD_INCLUDE_DIRS NAMES pthread.h)
21 find_library (LIBPTHREAD_LIBRARIES NAMES pthread)
22
23 include (FindPackageHandleStandardArgs)
24 FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBPTHREAD DEFAULT_MSG
25   LIBPTHREAD_LIBRARIES LIBPTHREAD_INCLUDE_DIRS)
26
27 mark_as_advanced(LIBPTHREAD_INCLUDE_DIRS LIBPTHREAD_LIBRARIES LIBPTHREAD_FOUND)