[PATCH] D76110: CMake: Turn LLVM_ENABLE_ZLIB into a tri-state option

Amy Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 13 14:03:11 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG9a349d66c918: CMake: Turn LLVM_ENABLE_ZLIB into a tri-state option (authored by akhuang).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76110/new/

https://reviews.llvm.org/D76110

Files:
  llvm/CMakeLists.txt
  llvm/cmake/config-ix.cmake


Index: llvm/cmake/config-ix.cmake
===================================================================
--- llvm/cmake/config-ix.cmake
+++ llvm/cmake/config-ix.cmake
@@ -175,6 +175,10 @@
   message(FATAL_ERROR "Failed to congifure libxml2")
 endif()
 
+if (LLVM_ENABLE_ZLIB STREQUAL "FORCE_ON" AND NOT HAVE_LIBZ)
+  message(FATAL_ERROR "Failed to configure zlib")
+endif()
+
 check_library_exists(xar xar_open "" HAVE_LIBXAR)
 if(HAVE_LIBXAR)
   set(XAR_LIB xar)
Index: llvm/CMakeLists.txt
===================================================================
--- llvm/CMakeLists.txt
+++ llvm/CMakeLists.txt
@@ -348,7 +348,7 @@
 
 option(LLVM_ENABLE_THREADS "Use threads if available." ON)
 
-option(LLVM_ENABLE_ZLIB "Use zlib for compression/decompression if available." ON)
+set(LLVM_ENABLE_ZLIB "ON" 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.")
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76110.250301.patch
Type: text/x-patch
Size: 980 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200313/15094605/attachment.bin>


More information about the llvm-commits mailing list