|
1 | | -if( WIN32 AND NOT CYGWIN ) |
2 | | - # We consider Cygwin as another Unix |
3 | | - set(PURE_WINDOWS 1) |
4 | | -endif() |
5 | | - |
6 | 1 | include(CheckIncludeFile) |
7 | 2 | include(CheckLibraryExists) |
8 | 3 | include(CheckSymbolExists) |
@@ -31,7 +26,7 @@ elseif (APPLE) |
31 | 26 | set(HAVE_SYS_MMAN_H 1) |
32 | 27 | set(HAVE_SYSEXITS_H 1) |
33 | 28 | set(HAVE_UNISTD_H 1) |
34 | | -elseif (PURE_WINDOWS) |
| 29 | +elseif (WIN32) |
35 | 30 | set(HAVE_MACH_MACH_H 0) |
36 | 31 | set(HAVE_MALLOC_MALLOC_H 0) |
37 | 32 | set(HAVE_PTHREAD_H 0) |
@@ -132,7 +127,7 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") |
132 | 127 | endif() |
133 | 128 |
|
134 | 129 | # library checks |
135 | | -if( NOT PURE_WINDOWS ) |
| 130 | +if(NOT WIN32) |
136 | 131 | check_library_exists(pthread pthread_create "" HAVE_LIBPTHREAD) |
137 | 132 | if (HAVE_LIBPTHREAD) |
138 | 133 | check_library_exists(pthread pthread_rwlock_init "" HAVE_PTHREAD_RWLOCK_INIT) |
@@ -264,7 +259,7 @@ endif() |
264 | 259 | # party code may call MSan interceptors like strlen, leading to false positives. |
265 | 260 | if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*") |
266 | 261 | # Don't look for these libraries on Windows. |
267 | | - if (NOT PURE_WINDOWS) |
| 262 | + if (NOT WIN32) |
268 | 263 | # Skip libedit if using ASan as it contains memory leaks. |
269 | 264 | if (LLVM_ENABLE_LIBEDIT AND NOT LLVM_USE_SANITIZER MATCHES ".*Address.*") |
270 | 265 | if(LLVM_ENABLE_LIBEDIT STREQUAL FORCE_ON) |
@@ -337,7 +332,7 @@ check_symbol_exists(sbrk unistd.h HAVE_SBRK) |
337 | 332 | check_symbol_exists(strerror_r string.h HAVE_STRERROR_R) |
338 | 333 | check_symbol_exists(strerror_s string.h HAVE_DECL_STRERROR_S) |
339 | 334 | check_symbol_exists(setenv stdlib.h HAVE_SETENV) |
340 | | -if( PURE_WINDOWS ) |
| 335 | +if(WIN32) |
341 | 336 | check_symbol_exists(_chsize_s io.h HAVE__CHSIZE_S) |
342 | 337 |
|
343 | 338 | check_function_exists(_alloca HAVE__ALLOCA) |
@@ -373,8 +368,7 @@ else() |
373 | 368 | "sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC) |
374 | 369 | endif() |
375 | 370 |
|
376 | | -# This check requires _GNU_SOURCE. |
377 | | -if (NOT PURE_WINDOWS) |
| 371 | +if (NOT WIN32) |
378 | 372 | if (LLVM_PTHREAD_LIB) |
379 | 373 | list(APPEND CMAKE_REQUIRED_LIBRARIES ${LLVM_PTHREAD_LIB}) |
380 | 374 | endif() |
|
0 commit comments