[PATCH] D85820: Use find_library for ncurses
Harmen Stoppels via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 12 12:39:44 PDT 2020
haampie updated this revision to Diff 285161.
haampie added a comment.
Simplified detection a bit
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85820/new/
https://reviews.llvm.org/D85820
Files:
llvm/cmake/config-ix.cmake
Index: llvm/cmake/config-ix.cmake
===================================================================
--- llvm/cmake/config-ix.cmake
+++ llvm/cmake/config-ix.cmake
@@ -147,19 +147,12 @@
else()
set(HAVE_LIBEDIT 0)
endif()
+ set(HAVE_TERMINFO 0)
if(LLVM_ENABLE_TERMINFO)
- set(HAVE_TERMINFO 0)
- foreach(library terminfo tinfo curses ncurses ncursesw)
- string(TOUPPER ${library} library_suffix)
- check_library_exists(${library} setupterm "" HAVE_TERMINFO_${library_suffix})
- if(HAVE_TERMINFO_${library_suffix})
- set(HAVE_TERMINFO 1)
- set(TERMINFO_LIBS "${library}")
- break()
- endif()
- endforeach()
- else()
- set(HAVE_TERMINFO 0)
+ find_library(TERMINFO_LIBS NAMES terminfo tinfo curses ncurses ncursesw)
+ if(TERMINFO_LIBS)
+ set(HAVE_TERMINFO 1)
+ endif()
endif()
find_library(ICONV_LIBRARY_PATH NAMES iconv libiconv libiconv-2 c)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85820.285161.patch
Type: text/x-patch
Size: 976 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200812/c5f62427/attachment.bin>
More information about the llvm-commits
mailing list