mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
CMake: Turn LLVM_ENABLE_ZLIB into a tri-state option
Summary: Add FORCE_ON option to LLVM_ENABLE_ZLIB, which causes a configuration error if zlib is not found. Similar to https://reviews.llvm.org/D40050. Reviewers: hans, thakis, rnk Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76110
This commit is contained in:
parent
a30499dbf2
commit
24d4829906
@ -348,7 +348,7 @@ option(LLVM_ENABLE_LIBPFM "Use libpfm for performance counters if available." ON
|
||||
|
||||
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.")
|
||||
|
||||
|
@ -175,6 +175,10 @@ if (LLVM_ENABLE_LIBXML2 STREQUAL "FORCE_ON" AND NOT LLVM_LIBXML2_ENABLED)
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user