Summary: This should provide the function similar to `--disable-libedit` with the autotools build system, which seems to be missing from the commit (r200595) that adds this.
Reviewers: pcc, beanz
Subscribers: mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D26550
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287293
91177308-0d34-0410-b5e6-
96231b3b80d8
option(LLVM_ENABLE_TERMINFO "Use terminfo database if available." ON)
+option(LLVM_ENABLE_LIBEDIT "Use libedit 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(HAVE_LIBZ 0)
endif()
# Skip libedit if using ASan as it contains memory leaks.
- if (HAVE_HISTEDIT_H AND NOT LLVM_USE_SANITIZER MATCHES ".*Address.*")
+ if (LLVM_ENABLE_LIBEDIT AND HAVE_HISTEDIT_H AND NOT LLVM_USE_SANITIZER MATCHES ".*Address.*")
check_library_exists(edit el_init "" HAVE_LIBEDIT)
+ else()
+ set(HAVE_LIBEDIT 0)
endif()
if(LLVM_ENABLE_TERMINFO)
set(HAVE_TERMINFO 0)