Skip to content

Commit 4007963

Browse files
committed
[RFC][OpenMP] Update to Python3 for lit test
I think it's reasonable to upgrade to Python 3 for LIT test requirement because `lit` itself (`llvm/utils/lit/lit.py`) already switched to Python 3. In addition, LLVM already requires Python 3.6 to be the minimum version (https://llvm.org/docs/GettingStarted.html#software). Reviewed By: jdoerfert, jhuber6 Differential Revision: https://reviews.llvm.org/D139855
1 parent ba2bb63 commit 4007963

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

openmp/cmake/OpenMPTesting.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ set(ENABLE_CHECK_TARGETS TRUE)
33

44
# Function to find required dependencies for testing.
55
function(find_standalone_test_dependencies)
6-
include(FindPythonInterp)
6+
find_package (Python3 COMPONENTS Interpreter)
77

8-
if (NOT PYTHONINTERP_FOUND)
8+
if (NOT Python3_Interpreter_FOUND)
99
message(STATUS "Could not find Python.")
1010
message(WARNING "The check targets will not be available!")
1111
set(ENABLE_CHECK_TARGETS FALSE PARENT_SCOPE)
@@ -207,7 +207,7 @@ function(add_openmp_testsuite target comment)
207207
if (${OPENMP_STANDALONE_BUILD})
208208
set(LIT_ARGS ${OPENMP_LIT_ARGS} ${ARG_ARGS})
209209
add_custom_target(${target}
210-
COMMAND ${PYTHON_EXECUTABLE} ${OPENMP_LLVM_LIT_EXECUTABLE} ${LIT_ARGS} ${ARG_UNPARSED_ARGUMENTS}
210+
COMMAND ${Python3_EXECUTABLE} ${OPENMP_LLVM_LIT_EXECUTABLE} ${LIT_ARGS} ${ARG_UNPARSED_ARGUMENTS}
211211
COMMENT ${comment}
212212
DEPENDS ${ARG_DEPENDS}
213213
USES_TERMINAL

0 commit comments

Comments
 (0)