Skip to content

Commit 536baa1

Browse files
committed
[lldb] Remove CMAKE_VERSION checks now that the minimum version is 3.13.4
1 parent adffce7 commit 536baa1

File tree

2 files changed

+7
-36
lines changed

2 files changed

+7
-36
lines changed

lldb/cmake/modules/FindPythonInterpAndLibs.cmake

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -61,46 +61,22 @@ if(PYTHON_LIBRARIES AND PYTHON_INCLUDE_DIRS AND PYTHON_EXECUTABLE AND SWIG_EXECU
6161
else()
6262
find_package(SWIG 2.0)
6363
if (SWIG_FOUND)
64-
if(NOT CMAKE_VERSION VERSION_LESS 3.12)
65-
if (LLDB_PYTHON_VERSION)
66-
if (LLDB_PYTHON_VERSION VERSION_EQUAL "2")
67-
FindPython2()
68-
elseif(LLDB_PYTHON_VERSION VERSION_EQUAL "3")
69-
FindPython3()
70-
endif()
71-
else()
64+
if (LLDB_PYTHON_VERSION)
65+
if (LLDB_PYTHON_VERSION VERSION_EQUAL "2")
66+
FindPython2()
67+
elseif(LLDB_PYTHON_VERSION VERSION_EQUAL "3")
7268
FindPython3()
73-
if (NOT PYTHON3_FOUND AND NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
74-
FindPython2()
75-
endif()
7669
endif()
7770
else()
78-
find_package(PythonInterp)
79-
find_package(PythonLibs)
80-
if(PYTHONINTERP_FOUND AND PYTHONLIBS_FOUND AND SWIG_FOUND)
81-
if (NOT CMAKE_CROSSCOMPILING)
82-
string(REPLACE "." ";" pythonlibs_version_list ${PYTHONLIBS_VERSION_STRING})
83-
list(GET pythonlibs_version_list 0 pythonlibs_major)
84-
list(GET pythonlibs_version_list 1 pythonlibs_minor)
85-
86-
# Ignore the patch version. Some versions of macOS report a different
87-
# patch version for the system provided interpreter and libraries.
88-
if (CMAKE_CROSSCOMPILING OR (PYTHON_VERSION_MAJOR VERSION_EQUAL pythonlibs_major AND
89-
PYTHON_VERSION_MINOR VERSION_EQUAL pythonlibs_minor))
90-
mark_as_advanced(
91-
PYTHON_LIBRARIES
92-
PYTHON_INCLUDE_DIRS
93-
PYTHON_EXECUTABLE
94-
SWIG_EXECUTABLE)
95-
endif()
96-
endif()
71+
FindPython3()
72+
if (NOT PYTHON3_FOUND AND NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
73+
FindPython2()
9774
endif()
9875
endif()
9976
else()
10077
message(STATUS "SWIG 2 or later is required for Python support in LLDB but could not be found")
10178
endif()
10279

103-
10480
include(FindPackageHandleStandardArgs)
10581
find_package_handle_standard_args(PythonInterpAndLibs
10682
FOUND_VAR

lldb/cmake/modules/LLDBConfig.cmake

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,6 @@ if(LLDB_BUILD_FRAMEWORK)
7979
if(NOT APPLE)
8080
message(FATAL_ERROR "LLDB.framework can only be generated when targeting Apple platforms")
8181
endif()
82-
# CMake 3.6 did not correctly emit POST_BUILD commands for Apple Framework targets
83-
# CMake < 3.8 did not have the BUILD_RPATH target property
84-
if(CMAKE_VERSION VERSION_LESS 3.8)
85-
message(FATAL_ERROR "LLDB_BUILD_FRAMEWORK is not supported on CMake < 3.8")
86-
endif()
8782

8883
set(LLDB_FRAMEWORK_VERSION A CACHE STRING "LLDB.framework version (default is A)")
8984
set(LLDB_FRAMEWORK_BUILD_DIR bin CACHE STRING "Output directory for LLDB.framework")

0 commit comments

Comments
 (0)