[PATCH] D147153: [CMake] Add missing find_package for LibEdit
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 21 15:35:18 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7d89e6c1c0a0: [CMake] Add missing find_package for LibEdit (authored by phosek).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147153/new/
https://reviews.llvm.org/D147153
Files:
llvm/cmake/config-ix.cmake
llvm/cmake/modules/LLVMConfig.cmake.in
Index: llvm/cmake/modules/LLVMConfig.cmake.in
===================================================================
--- llvm/cmake/modules/LLVMConfig.cmake.in
+++ llvm/cmake/modules/LLVMConfig.cmake.in
@@ -58,6 +58,11 @@
set(LLVM_ENABLE_RTTI @LLVM_ENABLE_RTTI@)
+set(LLVM_ENABLE_LIBEDIT @HAVE_LIBEDIT@)
+if(LLVM_ENABLE_LIBEDIT)
+ find_package(LibEdit)
+endif()
+
set(LLVM_ENABLE_TERMINFO @LLVM_ENABLE_TERMINFO@)
if(LLVM_ENABLE_TERMINFO)
find_package(Terminfo)
Index: llvm/cmake/config-ix.cmake
===================================================================
--- llvm/cmake/config-ix.cmake
+++ llvm/cmake/config-ix.cmake
@@ -220,8 +220,12 @@
if (NOT PURE_WINDOWS)
# Skip libedit if using ASan as it contains memory leaks.
if (LLVM_ENABLE_LIBEDIT AND NOT LLVM_USE_SANITIZER MATCHES ".*Address.*")
- find_package(LibEdit)
- set(HAVE_LIBEDIT ${LibEdit_FOUND})
+ if(LLVM_ENABLE_LIBEDIT STREQUAL FORCE_ON)
+ find_package(LibEdit REQUIRED)
+ else()
+ find_package(LibEdit)
+ endif()
+ set(HAVE_LIBEDIT "${LibEdit_FOUND}")
else()
set(HAVE_LIBEDIT 0)
endif()
@@ -234,9 +238,11 @@
set(LLVM_ENABLE_TERMINFO "${Terminfo_FOUND}")
endif()
else()
+ set(HAVE_LIBEDIT 0)
set(LLVM_ENABLE_TERMINFO 0)
endif()
else()
+ set(HAVE_LIBEDIT 0)
set(LLVM_ENABLE_TERMINFO 0)
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147153.515937.patch
Type: text/x-patch
Size: 1376 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230421/bb6ee024/attachment.bin>
More information about the llvm-commits
mailing list