[Cmake] Unify python variables
authorJonas Devlieghere <jonas@devlieghere.com>
Fri, 29 Mar 2019 17:35:42 +0000 (17:35 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Fri, 29 Mar 2019 17:35:42 +0000 (17:35 +0000)
commitae1cc995e358ef3635bf1f3c3f4f5c0f15c40f98
treebd0f0a91bdc354e2c80ecf10e8829b402be0b094
parentb4b98a528b2bcedc49d70e31ea5a42808a7aca3b
[Cmake] Unify python variables

FindPythonInterp and FindPythonLibs do two things, they set some
variables (PYTHON_LIBRARIES, PYTHON_INCLUDE_DIRS) and update the cached
variables (PYTHON_LIBRARY, PYTHON_INCLUDE_DIR) which 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.

Differential revision: https://reviews.llvm.org/D59968

llvm-svn: 357282
lldb/cmake/modules/LLDBConfig.cmake
lldb/scripts/CMakeLists.txt
lldb/source/Utility/CMakeLists.txt