[PATCH] D85820: Use find_library for ncurses
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 14 09:12:27 PDT 2020
JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.
One more comment about the duplicated `find_library` line, but otherwise this LGTM.
================
Comment at: llvm/cmake/config-ix.cmake:153
+ elseif(LLVM_ENABLE_TERMINFO)
+ find_library(TERMINFO_LIB NAMES terminfo tinfo curses ncurses ncursesw)
+ endif()
----------------
Sorry to keep bothering you with these nits, but you could simplify this a bit, either by moving `terminfo tinfo curses ncurses ncursesw` into a variable and using that in the repeated `find_library` statement, or better, you could set a variable like this:
```
if(LLVM_ENABLE_TERMINFO STREQUAL FORCE_ON)
set(MAYBE_REQUIRED REQUIRED)
else()
set(MAYBE_REQUIRED)
endif()
if (LLVM_ENABLE_TERMINFO)
find_library(TERMINFO_LIB NAMES terminfo tinfo curses ncurses ncursesw ${MAYBE_REQUIRED})
endif()
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85820/new/
https://reviews.llvm.org/D85820
More information about the llvm-commits
mailing list