From 20f17149a8b158690c9ac72c03014b0d269da49c Mon Sep 17 00:00:00 2001 From: Oscar Fuentes Date: Thu, 5 Nov 2009 18:57:56 +0000 Subject: CMake: do not test for pthread and dl libraries on Windows (except Cygwin). Fixes PR 5368. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86152 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/config-ix.cmake | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'cmake') diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index acf3a2e..9351f26 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -39,7 +39,9 @@ check_include_file(malloc.h HAVE_MALLOC_H) check_include_file(malloc/malloc.h HAVE_MALLOC_MALLOC_H) check_include_file(memory.h HAVE_MEMORY_H) check_include_file(ndir.h HAVE_NDIR_H) -check_include_file(pthread.h HAVE_PTHREAD_H) +if( NOT LLVM_ON_WIN32 ) + check_include_file(pthread.h HAVE_PTHREAD_H) +endif() check_include_file(setjmp.h HAVE_SETJMP_H) check_include_file(signal.h HAVE_SIGNAL_H) check_include_file(stdint.h HAVE_STDINT_H) @@ -63,10 +65,12 @@ check_include_file(utime.h HAVE_UTIME_H) check_include_file(windows.h HAVE_WINDOWS_H) # library checks -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(dl dlopen "" HAVE_LIBDL) +if( NOT LLVM_ON_WIN32 ) + 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(dl dlopen "" HAVE_LIBDL) +endif() # function checks check_symbol_exists(getpagesize unistd.h HAVE_GETPAGESIZE) @@ -86,7 +90,9 @@ check_symbol_exists(malloc_zone_statistics malloc/malloc.h check_symbol_exists(mkdtemp "stdlib.h;unistd.h" HAVE_MKDTEMP) check_symbol_exists(mkstemp "stdlib.h;unistd.h" HAVE_MKSTEMP) check_symbol_exists(mktemp "stdlib.h;unistd.h" HAVE_MKTEMP) -check_symbol_exists(pthread_mutex_lock pthread.h HAVE_PTHREAD_MUTEX_LOCK) +if( NOT LLVM_ON_WIN32 ) + check_symbol_exists(pthread_mutex_lock pthread.h HAVE_PTHREAD_MUTEX_LOCK) +endif() check_symbol_exists(sbrk unistd.h HAVE_SBRK) check_symbol_exists(strtoll stdlib.h HAVE_STRTOLL) check_symbol_exists(strerror string.h HAVE_STRERROR) -- cgit v1.1