[Lldb-commits] [lldb] [lldb] Fix manual CURSES_LIBRARIES tinfo finding (PR #128245)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Fri Feb 21 15:17:57 PST 2025
================
@@ -6,15 +6,24 @@
include(CMakePushCheckState)
-function(lldb_check_curses_tinfo CURSES_LIBRARIES CURSES_HAS_TINFO)
+function(lldb_check_curses_tinfo CURSES_HEADER CURSES_LIBRARIES CURSES_HAS_TINFO)
cmake_reset_check_state()
set(CMAKE_REQUIRED_LIBRARIES "${CURSES_LIBRARIES}")
# acs_map is one of many symbols that are part of tinfo but could
# be bundled in curses.
- check_symbol_exists(acs_map "curses.h" CURSES_HAS_TINFO)
+ check_symbol_exists(acs_map "${CURSES_HEADER}" CURSES_HAS_TINFO)
----------------
JDevlieghere wrote:
Can we avoid the curses header altogether by using `check_library_exists(curses, tinfo_get, ${CURSES_LIBRARIES} HAVE_LIBRARY_TINFO)`? As a counter-argument, [the documentation](https://cmake.org/cmake/help/latest/module/CheckLibraryExists.html) encourages preferring `check_symbol_exists`.
https://github.com/llvm/llvm-project/pull/128245
More information about the lldb-commits
mailing list