[Lldb-commits] [lldb] [lldb] Add terminfo dependency for ncurses support (PR #126810)
Jordan R AW via lldb-commits
lldb-commits at lists.llvm.org
Fri Feb 14 16:56:39 PST 2025
================
@@ -2,23 +2,54 @@
# FindCursesAndPanel
# -----------
#
-# Find the curses and panel library as a whole.
+# Find the curses, terminfo, and panel library as a whole.
-if(CURSES_INCLUDE_DIRS AND CURSES_LIBRARIES AND PANEL_LIBRARIES)
+include(CMakePushCheckState)
+
+function(lldb_check_curses_tinfo CURSES_LIBRARIES CURSES_HAS_TINFO)
+ cmake_reset_check_state()
+ set(CMAKE_REQUIRED_LIBRARIES "${CURSES_LIBRARIES}")
----------------
ajordanr-google wrote:
This function is primarily here so that we don't have scope leak on modifying `CMAKE_REQUIRED_LIBRARIES` (which we want to restrict to only our given curses `.so`, and no other).
I'm not super sure how scope guarding works with how these `Find*` modules work, but I wanted to be sure that we don't actually modify CMAKE_REQUIRED_LIBRARIES outside of any other scope.
Not sure if that makes too much sense, but we _could_ move it out if you're okay with other libraries providing `acs_map`, not just the found `libcurses.so`.
https://github.com/llvm/llvm-project/pull/126810
More information about the lldb-commits
mailing list