[Lldb-commits] [PATCH] D59968: [Cmake] Unify python variables
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Mar 29 10:34:21 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rLLDB357282: [Cmake] Unify python variables (authored by JDevlieghere, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D59968?vs=192735&id=192858#toc
Repository:
rLLDB LLDB
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59968/new/
https://reviews.llvm.org/D59968
Files:
cmake/modules/LLDBConfig.cmake
scripts/CMakeLists.txt
source/Utility/CMakeLists.txt
Index: source/Utility/CMakeLists.txt
===================================================================
--- source/Utility/CMakeLists.txt
+++ source/Utility/CMakeLists.txt
@@ -27,7 +27,7 @@
endif()
if (NOT LLDB_DISABLE_PYTHON AND NOT LLVM_BUILD_STATIC)
- list(APPEND LLDB_SYSTEM_LIBS ${PYTHON_LIBRARIES})
+ list(APPEND LLDB_SYSTEM_LIBS ${PYTHON_LIBRARY})
endif()
list(APPEND LLDB_SYSTEM_LIBS ${system_libs})
Index: scripts/CMakeLists.txt
===================================================================
--- scripts/CMakeLists.txt
+++ scripts/CMakeLists.txt
@@ -9,8 +9,6 @@
${LLDB_SOURCE_DIR}/include/lldb/lldb-versioning.h
)
-include(FindPythonInterp)
-
if(LLDB_BUILD_FRAMEWORK)
set(framework_arg --framework --target-platform Darwin)
endif()
Index: cmake/modules/LLDBConfig.cmake
===================================================================
--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -135,10 +135,10 @@
return()
endif()
- file(TO_CMAKE_PATH "${PYTHON_HOME}/Include" PYTHON_INCLUDE_DIRS)
+ file(TO_CMAKE_PATH "${PYTHON_HOME}/Include" PYTHON_INCLUDE_DIR)
- if(EXISTS "${PYTHON_INCLUDE_DIRS}/patchlevel.h")
- file(STRINGS "${PYTHON_INCLUDE_DIRS}/patchlevel.h" python_version_str
+ if(EXISTS "${PYTHON_INCLUDE_DIR}/patchlevel.h")
+ file(STRINGS "${PYTHON_INCLUDE_DIR}/patchlevel.h" python_version_str
REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"")
string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"+]+)[+]?\".*" "\\1"
PYTHONLIBS_VERSION_STRING "${python_version_str}")
@@ -146,7 +146,7 @@
string(REGEX REPLACE "([0-9]+)[.]([0-9]+)[.][0-9]+" "python\\1\\2" PYTHONLIBS_BASE_NAME "${PYTHONLIBS_VERSION_STRING}")
unset(python_version_str)
else()
- message("Unable to find ${PYTHON_INCLUDE_DIRS}/patchlevel.h, Python installation is corrupt.")
+ message("Unable to find ${PYTHON_INCLUDE_DIR}/patchlevel.h, Python installation is corrupt.")
message("Python support will be disabled for this build.")
set(LLDB_DISABLE_PYTHON 1 PARENT_SCOPE)
return()
@@ -225,12 +225,12 @@
set (PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} PARENT_SCOPE)
set (PYTHON_LIBRARY ${PYTHON_LIBRARY} PARENT_SCOPE)
set (PYTHON_DLL ${PYTHON_DLL} PARENT_SCOPE)
- set (PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS} PARENT_SCOPE)
+ set (PYTHON_INCLUDE_DIR ${PYTHON_INCLUDE_DIR} PARENT_SCOPE)
message("-- LLDB Found PythonExecutable: ${PYTHON_RELEASE_EXE} and ${PYTHON_DEBUG_EXE}")
message("-- LLDB Found PythonLibs: ${PYTHON_RELEASE_LIB} and ${PYTHON_DEBUG_LIB}")
message("-- LLDB Found PythonDLL: ${PYTHON_RELEASE_DLL} and ${PYTHON_DEBUG_DLL}")
- message("-- LLDB Found PythonIncludeDirs: ${PYTHON_INCLUDE_DIRS}")
+ message("-- LLDB Found PythonIncludeDirs: ${PYTHON_INCLUDE_DIR}")
endfunction(find_python_libs_windows)
if (NOT LLDB_DISABLE_PYTHON)
@@ -243,17 +243,19 @@
add_definitions( -DLLDB_PYTHON_HOME="${LLDB_PYTHON_HOME}" )
endif()
else()
- find_package(PythonLibs REQUIRED)
+ find_package(PythonInterp)
+ find_package(PythonLibs)
endif()
-
- if (PYTHON_INCLUDE_DIRS)
- include_directories(${PYTHON_INCLUDE_DIRS})
+
+ if (PYTHON_INCLUDE_DIR)
+ include_directories(${PYTHON_INCLUDE_DIR})
endif()
endif()
if (LLDB_DISABLE_PYTHON)
- unset(PYTHON_INCLUDE_DIRS)
+ unset(PYTHON_INCLUDE_DIR)
unset(PYTHON_LIBRARY)
+ unset(PYTHON_EXECUTABLE)
add_definitions( -DLLDB_DISABLE_PYTHON )
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59968.192858.patch
Type: text/x-patch
Size: 3480 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190329/49957205/attachment.bin>
More information about the lldb-commits
mailing list