Commit a2ca1c2d authored by Saleem Abdulrasool's avatar Saleem Abdulrasool
Browse files

build: disable zlib by default on Windows

zlib usage on Windows has caused issues in the past.  Furthermore, the
GNUWin32 library can be detected and used although the headers are not
available.  Require Windows to explicitly opt in.
parent 8f1caf51
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -347,7 +347,13 @@ option(LLVM_ENABLE_LIBPFM "Use libpfm for performance counters if available." ON

option(LLVM_ENABLE_THREADS "Use threads if available." ON)

set(LLVM_ENABLE_ZLIB "ON" CACHE STRING "Use zlib for compression/decompression if available. Can be ON, OFF, or FORCE_ON")
if(CMAKE_SYSTEM_NAME STREQUAL Windows)
  set(zlib_DEFAULT "OFF")
else()
  set(zlib_DEFAULT "ON")
endif()

set(LLVM_ENABLE_ZLIB "${zlib_DEFAULT}" CACHE STRING "Use zlib for compression/decompression if available. Can be ON, OFF, or FORCE_ON")

set(LLVM_Z3_INSTALL_DIR "" CACHE STRING "Install directory of the Z3 solver.")