[Lldb-commits] [lldb] r374100 - [CMake] Fix building without python on Windows
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 8 11:38:46 PDT 2019
Author: xiaobai
Date: Tue Oct 8 11:38:46 2019
New Revision: 374100
URL: http://llvm.org/viewvc/llvm-project?rev=374100&view=rev
Log:
[CMake] Fix building without python on Windows
Summary: find_python_libs_windows might set LLDB_DISABLE_PYTHON to ON.
Unfortunately we do not re-check this variable before using variables filled in
by find_python_libs_windows, leading to a failed configuration.
Modified:
lldb/trunk/cmake/modules/LLDBConfig.cmake
Modified: lldb/trunk/cmake/modules/LLDBConfig.cmake
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBConfig.cmake?rev=374100&r1=374099&r2=374100&view=diff
==============================================================================
--- lldb/trunk/cmake/modules/LLDBConfig.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBConfig.cmake Tue Oct 8 11:38:46 2019
@@ -267,10 +267,15 @@ function(find_python_libs_windows)
message(STATUS "LLDB Found PythonIncludeDirs: ${PYTHON_INCLUDE_DIR}")
endfunction(find_python_libs_windows)
+# Call find_python_libs_windows ahead of the rest of the python configuration.
+# It's possible that it won't find a python installation and will then set
+# LLDB_DISABLE_PYTHON to ON.
+if (NOT LLDB_DISABLE_PYTHON AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
+ find_python_libs_windows()
+endif()
+
if (NOT LLDB_DISABLE_PYTHON)
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
- find_python_libs_windows()
-
if (NOT LLDB_RELOCATABLE_PYTHON)
file(TO_CMAKE_PATH "${PYTHON_HOME}" LLDB_PYTHON_HOME)
add_definitions( -DLLDB_PYTHON_HOME="${LLDB_PYTHON_HOME}" )
More information about the lldb-commits
mailing list