summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2012-09-04 09:14:45 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2012-09-04 09:14:45 +0000
commit68d92bdcc99e647546f40cfce5cfbeb904be2985 (patch)
treea626ade038a96ddc5decd9b7c8b5b1bf011df8b7 /cmake
parent5eae90d727c64ca5b4b43b110521b38dcd9f0de6 (diff)
downloadllvm-68d92bdcc99e647546f40cfce5cfbeb904be2985.tar.gz
llvm-68d92bdcc99e647546f40cfce5cfbeb904be2985.tar.bz2
llvm-68d92bdcc99e647546f40cfce5cfbeb904be2985.tar.xz
Fix Android build of gtest and lib/Support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163131 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rwxr-xr-xcmake/config-ix.cmake16
1 files changed, 13 insertions, 3 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index 9637363d38..fcd5dd5566 100755
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -85,9 +85,19 @@ check_include_file(mach-o/dyld.h HAVE_MACH_O_DYLD_H)
# library checks
if( NOT PURE_WINDOWS )
check_library_exists(pthread pthread_create "" HAVE_LIBPTHREAD)
- check_library_exists(pthread pthread_getspecific "" HAVE_PTHREAD_GETSPECIFIC)
- check_library_exists(pthread pthread_rwlock_init "" HAVE_PTHREAD_RWLOCK_INIT)
- check_library_exists(pthread pthread_mutex_lock "" HAVE_PTHREAD_MUTEX_LOCK)
+ if (HAVE_LIBPTHREAD)
+ check_library_exists(pthread pthread_getspecific "" HAVE_PTHREAD_GETSPECIFIC)
+ check_library_exists(pthread pthread_rwlock_init "" HAVE_PTHREAD_RWLOCK_INIT)
+ check_library_exists(pthread pthread_mutex_lock "" HAVE_PTHREAD_MUTEX_LOCK)
+ else()
+ # this could be Android
+ check_library_exists(c pthread_create "" PTHREAD_IN_LIBC)
+ if (PTHREAD_IN_LIBC)
+ check_library_exists(c pthread_getspecific "" HAVE_PTHREAD_GETSPECIFIC)
+ check_library_exists(c pthread_rwlock_init "" HAVE_PTHREAD_RWLOCK_INIT)
+ check_library_exists(c pthread_mutex_lock "" HAVE_PTHREAD_MUTEX_LOCK)
+ endif()
+ endif()
check_library_exists(dl dlopen "" HAVE_LIBDL)
endif()