[Lldb-commits] [PATCH] D59968: [Cmake] Unify python variables

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 28 16:33:24 PDT 2019


JDevlieghere created this revision.
JDevlieghere added reviewers: zturner, stella.stamenova, labath, sgraenitz.
Herald added subscribers: lldb-commits, abidh, mgorny.
Herald added a project: LLDB.

Both FindPythonInterp and FindPythonLibs do two things, they'll set some variables (PYTHON_LIBRARIES, PYTHON_INCLUDE_DIRS) and update the cached variables (PYTHON_LIBRARY, PYTHON_INCLUDE_DIR) that are also used to specify a custom python installation.

I believe the canonical way to do this is to use the PYTHON_LIBRARIES and PYTHON_INCLUDE_DIRS variables instead of the cached ones. However, since the cached variables are accessible from the cache and GUI, this is a lot less confusing when you're trying to debug why a variable did or didn't get the value you expected. Furthermore, as far as I can tell,  the implementation uses the cached variables to set their LIBRARIES/DIRS counterparts. This is also the reason this works today even though we mix-and-match.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D59968

Files:
  lldb/cmake/modules/LLDBConfig.cmake
  lldb/scripts/CMakeLists.txt
  lldb/scripts/Python/modules/readline/CMakeLists.txt
  lldb/source/Utility/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59968.192735.patch
Type: text/x-patch
Size: 4081 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190328/c7d4c73e/attachment.bin>


More information about the lldb-commits mailing list