Skip to content

Commit dd8898d

Browse files
mstorsjotkrasnukha
authored andcommitted
Don't error out if the terminfo libraries aren't found
In current LLVM releases (10 and 11 at least), LLVM_ENABLE_TERMINFO only indicates whether it tried to find a terminfo library, but the LLVM cmake configuration might still have not found any library despite that. In the current LLVM master branch (upcoming 12 release), LLVM_ENABLE_TERMINFO is updated after the fact, indicating whether it actually ended up using (and requiring) such a library. For cases where a terminfo library really is required but isn't found, this pushes the errors from the cmake phase onto the linking phase, but fixes cases with LLVM 10 and 11 (and possibly other older releases as well) if LLVM didn't end up using any terminfo library.
1 parent eafe114 commit dd8898d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ if (NOT lib_llvm)
9797
list(APPEND llvm_deps "${lib}")
9898
endforeach()
9999
if (LLVM_ENABLE_TERMINFO AND NOT WIN32)
100-
find_library(TERMINFO_LIB NAMES terminfo tinfo curses ncurses ncursesw REQUIRED)
100+
find_library(TERMINFO_LIB NAMES terminfo tinfo curses ncurses ncursesw)
101101
list(APPEND llvm_deps "${TERMINFO_LIB}")
102102
endif()
103103
endif()

0 commit comments

Comments
 (0)