mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
CMake: Turn LLVM_ENABLE_LIBXML2 into a tri-state option
In addition to the current ON and OFF options, this adds the FORCE_ON option, which causes a configuration error if libxml2 cannot be used. Differential revision: https://reviews.llvm.org/D40050 llvm-svn: 318209
This commit is contained in:
parent
61a86474b9
commit
da29bc5094
@ -347,7 +347,7 @@ set(LLVM_TARGET_ARCH "host"
|
||||
|
||||
option(LLVM_ENABLE_TERMINFO "Use terminfo database if available." ON)
|
||||
|
||||
option(LLVM_ENABLE_LIBXML2 "Use libxml2 if available." ON)
|
||||
set(LLVM_ENABLE_LIBXML2 "ON" CACHE STRING "Use libxml2 if available. Can be ON, OFF, or FORCE_ON")
|
||||
|
||||
option(LLVM_ENABLE_LIBEDIT "Use libedit if available." ON)
|
||||
|
||||
|
@ -170,6 +170,10 @@ if( NOT PURE_WINDOWS AND NOT LLVM_USE_SANITIZER MATCHES "Memory.*")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (LLVM_ENABLE_LIBXML2 STREQUAL "FORCE_ON" AND NOT LLVM_LIBXML2_ENABLED)
|
||||
message(FATAL_ERROR "Failed to congifure libxml2")
|
||||
endif()
|
||||
|
||||
check_library_exists(xar xar_open "" HAVE_LIBXAR)
|
||||
if(HAVE_LIBXAR)
|
||||
set(XAR_LIB xar)
|
||||
|
Loading…
Reference in New Issue
Block a user