diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2020-01-06 09:56:46 -0800 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2020-01-06 10:07:46 -0800 |
commit | 8c8ffd461d16681cb1fc764bedfa8b09fde260aa (patch) | |
tree | a9262bc8f2c93901bc85d590b485d86300f21cc4 | |
parent | bbfebd7b8a671c9649305b8a5f72e93dd1ef60e1 (diff) | |
download | bcm5719-llvm-8c8ffd461d16681cb1fc764bedfa8b09fde260aa.tar.gz bcm5719-llvm-8c8ffd461d16681cb1fc764bedfa8b09fde260aa.zip |
[lldb/CMake] Only set PYTHON_HOME on Windows
My earlier change for Python auto-detection caused PYTHON_HOME to be set
unconditionally, while before the change this only happened for Windows.
This caused the PythonDataObjectsTest to fail with an import error.
-rw-r--r-- | lldb/cmake/modules/LLDBConfig.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake index 12fb97fc9d7..f318b5c8bd2 100644 --- a/lldb/cmake/modules/LLDBConfig.cmake +++ b/lldb/cmake/modules/LLDBConfig.cmake @@ -135,7 +135,7 @@ endif() if (LLDB_ENABLE_PYTHON) include_directories(${PYTHON_INCLUDE_DIRS}) - if (NOT LLDB_RELOCATABLE_PYTHON) + if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows" AND NOT LLDB_RELOCATABLE_PYTHON) get_filename_component(PYTHON_HOME "${PYTHON_EXECUTABLE}" DIRECTORY) file(TO_CMAKE_PATH "${PYTHON_HOME}" LLDB_PYTHON_HOME) endif() |