Skip to content

Commit d4713ec

Browse files
[lldb][windows] add a warning if CMake's version is inferior to 3.30 (#164346)
#140443 makes use of the CMake variable `Python3_EXECUTABLE_DEBUG`, which was introduced in CMake version 3.30. On systems with an inferior version of cmake, the lit tests will try to run with an empty `config.python_executable`. This PR adds a warning and falls back to using `Python3_EXECUTABLE` if the CMake version is less than `3.30`.
1 parent 925b106 commit d4713ec

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lldb/test/API/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,12 @@ if(CMAKE_HOST_APPLE)
140140
endif()
141141

142142
if(WIN32 AND CMAKE_BUILD_TYPE STREQUAL Debug)
143-
set(LLDB_PYTHON_API_TEST_EXECUTABLE "${Python3_EXECUTABLE_DEBUG}")
143+
if(${CMAKE_VERSION} VERSION_LESS "3.30")
144+
message(WARNING "CMake version is inferior to 3.30. Some lldb tests will fail.")
145+
set(LLDB_PYTHON_API_TEST_EXECUTABLE "${Python3_EXECUTABLE}")
146+
else()
147+
set(LLDB_PYTHON_API_TEST_EXECUTABLE "${Python3_EXECUTABLE_DEBUG}")
148+
endif()
144149
else()
145150
set(LLDB_PYTHON_API_TEST_EXECUTABLE "${Python3_EXECUTABLE}")
146151
endif()

0 commit comments

Comments
 (0)