summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2011-02-04 05:40:04 +0000
committerOscar Fuentes <ofv@wanadoo.es>2011-02-04 05:40:04 +0000
commit325610bf779b97cf9b0dd9cae470b74fd3bd3944 (patch)
tree169a4ac85a19239159e75a0fcd32be5ab2cf1a94 /cmake
parentba6ac919951b8c09c8c22bcdd96dabc5cc30c112 (diff)
downloadllvm-325610bf779b97cf9b0dd9cae470b74fd3bd3944.tar.gz
llvm-325610bf779b97cf9b0dd9cae470b74fd3bd3944.tar.bz2
llvm-325610bf779b97cf9b0dd9cae470b74fd3bd3944.tar.xz
LLVM_ON_WIN32 is not defined on config-ix.cmake. Use something else.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124857 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rwxr-xr-xcmake/config-ix.cmake13
1 files changed, 9 insertions, 4 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index 8484bb6251..5bfc7448cf 100755
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -1,3 +1,8 @@
+if( WIN32 AND NOT CYGWIN )
+ # We consider Cygwin as another Unix
+ set(PURE_WINDOWS 1)
+endif()
+
include(CheckIncludeFile)
include(CheckLibraryExists)
include(CheckSymbolExists)
@@ -46,7 +51,7 @@ 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)
-if( NOT LLVM_ON_WIN32 )
+if( NOT PURE_WINDOWS )
check_include_file(pthread.h HAVE_PTHREAD_H)
endif()
check_include_file(setjmp.h HAVE_SETJMP_H)
@@ -78,7 +83,7 @@ check_include_file(mach/mach.h HAVE_MACH_MACH_H)
check_include_file(mach-o/dyld.h HAVE_MACH_O_DYLD_H)
# library checks
-if( NOT LLVM_ON_WIN32 )
+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)
@@ -126,7 +131,7 @@ check_symbol_exists(strchr string.h HAVE_STRCHR)
check_symbol_exists(strcmp string.h HAVE_STRCMP)
check_symbol_exists(strdup string.h HAVE_STRDUP)
check_symbol_exists(strrchr string.h HAVE_STRRCHR)
-if( NOT LLVM_ON_WIN32 )
+if( NOT PURE_WINDOWS )
check_symbol_exists(pthread_mutex_lock pthread.h HAVE_PTHREAD_MUTEX_LOCK)
endif()
check_symbol_exists(sbrk unistd.h HAVE_SBRK)
@@ -148,7 +153,7 @@ check_symbol_exists(strerror_s string.h HAVE_STRERROR_S)
check_symbol_exists(memcpy string.h HAVE_MEMCPY)
check_symbol_exists(memmove string.h HAVE_MEMMOVE)
check_symbol_exists(setenv stdlib.h HAVE_SETENV)
-if ( LLVM_ON_WIN32 )
+if( PURE_WINDOWS )
check_symbol_exists(_chsize_s io.h HAVE__CHSIZE_S)
endif()
if( HAVE_ARGZ_H )