[Lldb-commits] [PATCH] D71306: [RFC] Change how we deal with optional dependencies

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Dec 20 10:09:51 PST 2019


JDevlieghere marked 2 inline comments as done.
JDevlieghere added inline comments.


================
Comment at: lldb/cmake/modules/FindCursesAndPanel.cmake:8
+if(CURSES_INCLUDE_DIRS AND CURSES_LIBRARIES AND PANEL_LIBRARIES)
+  set(CURSES_PANEL_FOUND TRUE)
+else()
----------------
labath wrote:
> It's not fully clear to me what will happen when this code is run for the first time (when `CURSES_INCLUDE_DIRS`, etc. is not defined yet). Who will set `CURSES_PANEL_FOUND` in that case? Could you make sure this works correctly when run for the first time on a fully clean build?
> 
> I don't know whether this is the standard way of writing find_package files, but I'd consider just removing the caching and letting `find_package(Curses)` and  `find_library(panel)` just run every time -- they already contain some internal caching so we're not saving much here anyway...
I inspired myself on other FindPackage code. I have to admit that I don't know how it works exactly, but it behaves the way you expect. I did a clean build to verify. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71306/new/

https://reviews.llvm.org/D71306





More information about the lldb-commits mailing list