[Lldb-commits] [lldb] b449d19 - build: use `find_package(Python3)` rather than `PYTHON_HOME`
Saleem Abdulrasool via lldb-commits
lldb-commits at lists.llvm.org
Sun Dec 22 20:47:44 PST 2019
Author: Saleem Abdulrasool
Date: 2019-12-22T20:47:25-08:00
New Revision: b449d19e55888ab9554b04184c6d9716389820fd
URL: https://github.com/llvm/llvm-project/commit/b449d19e55888ab9554b04184c6d9716389820fd
DIFF: https://github.com/llvm/llvm-project/commit/b449d19e55888ab9554b04184c6d9716389820fd.diff
LOG: build: use `find_package(Python3)` rather than `PYTHON_HOME`
The behaviour of `PYTHON_HOME` can be emulated by setting
`Python3_EXECUTABLE` to the absolute path instead of the custom variable
now that we can find the python interpreter.
Added:
Modified:
lldb/cmake/modules/LLDBConfig.cmake
Removed:
################################################################################
diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake
index e1da76cf6249..674b024492ef 100644
--- a/lldb/cmake/modules/LLDBConfig.cmake
+++ b/lldb/cmake/modules/LLDBConfig.cmake
@@ -148,6 +148,7 @@ if (LLDB_ENABLE_PYTHON)
include_directories(${Python3_INCLUDE_DIRS})
if (NOT LLDB_RELOCATABLE_PYTHON)
+ get_filename_component(PYTHON_HOME "${Python3_EXECUTABLE}" DIRECTORY)
file(TO_CMAKE_PATH "${PYTHON_HOME}" LLDB_PYTHON_HOME)
endif()
else()
More information about the lldb-commits
mailing list