summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Lanza <nathan@lanza.io>2019-07-16 23:54:17 +0000
committerNathan Lanza <nathan@lanza.io>2019-07-16 23:54:17 +0000
commitfa7bd50434413a91203884575c219fd624568aba (patch)
treed5f22bbca3b15b31e23d9aae3f3aa6d053df73d8
parent0500f70e90fb0948dc60d5c57bf873bb94a50f28 (diff)
Don't require python exe and lib versions to match while crosscompiling
Summary: While cross compiling, the python executable is used to run a handful of scripts while the libraries are linked and headers are included. Theoretically it's possible for the versions to match completely, but requiring the build to match 2.7.10 to 2.7.15 is unnecessary. Subscribers: mgorny Differential Revision: https://reviews.llvm.org/D64822 git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@366285 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--cmake/modules/LLDBConfig.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmake/modules/LLDBConfig.cmake b/cmake/modules/LLDBConfig.cmake
index ad83153a1..ccb5de568 100644
--- a/cmake/modules/LLDBConfig.cmake
+++ b/cmake/modules/LLDBConfig.cmake
@@ -198,7 +198,8 @@ if (NOT LLDB_DISABLE_PYTHON)
find_package(PythonLibs REQUIRED)
endif()
- if (NOT PYTHON_VERSION_STRING VERSION_EQUAL PYTHONLIBS_VERSION_STRING)
+ if (NOT PYTHON_VERSION_STRING VERSION_EQUAL PYTHONLIBS_VERSION_STRING AND
+ NOT CMAKE_CROSSCOMPILING)
message(FATAL_ERROR "Found incompatible Python interpreter (${PYTHON_VERSION_STRING}) and Python libraries (${PYTHONLIBS_VERSION_STRING})")
endif()