Skip to content

Commit a6e2006

Browse files
author
Oscar Fuentes
committed
CMake: Detects libpthread and sets HAVE_LIBPTHREAD.
llvm-svn: 71084
1 parent 60acda7 commit a6e2006

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

llvm/cmake/config-ix.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ check_include_file(unistd.h HAVE_UNISTD_H)
3737
check_include_file(utime.h HAVE_UTIME_H)
3838
check_include_file(windows.h HAVE_WINDOWS_H)
3939

40+
# library checks
41+
include(CheckLibraryExists)
42+
check_library_exists(pthread pthread_create "" HAVE_LIBPTHREAD)
43+
4044
# function checks
4145
include(CheckSymbolExists)
4246
check_symbol_exists(getpagesize unistd.h HAVE_GETPAGESIZE)

llvm/include/llvm/Config/config.h.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194
#cmakedefine HAVE_LIBPSAPI ${HAVE_LIBPSAPI}
195195

196196
/* Define to 1 if you have the `pthread' library (-lpthread). */
197-
#undef HAVE_LIBPTHREAD
197+
#cmakedefine HAVE_LIBPTHREAD ${HAVE_LIBPTHREAD}
198198

199199
/* Define to 1 if you have the `udis86' library (-ludis86). */
200200
#undef HAVE_LIBUDIS86

0 commit comments

Comments
 (0)