aboutsummaryrefslogtreecommitdiff
path: root/openmp/cmake
diff options
context:
space:
mode:
authorShilei Tian <i@tianshilei.me>2022-12-26 21:39:33 -0500
committerShilei Tian <i@tianshilei.me>2022-12-26 21:39:51 -0500
commit40079637569f999015eaf3f7e137a63b2c8ade92 (patch)
treed63db17411a8bd3cee76228db92c3dc4bad12b9e /openmp/cmake
parentba2bb63562faad380c1061520da3ba611887d740 (diff)
downloadllvm-40079637569f999015eaf3f7e137a63b2c8ade92.zip
llvm-40079637569f999015eaf3f7e137a63b2c8ade92.tar.gz
llvm-40079637569f999015eaf3f7e137a63b2c8ade92.tar.bz2
[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
Diffstat (limited to 'openmp/cmake')
-rw-r--r--openmp/cmake/OpenMPTesting.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/openmp/cmake/OpenMPTesting.cmake b/openmp/cmake/OpenMPTesting.cmake
index 01f49cf..a771efd 100644
--- a/openmp/cmake/OpenMPTesting.cmake
+++ b/openmp/cmake/OpenMPTesting.cmake
@@ -3,9 +3,9 @@ set(ENABLE_CHECK_TARGETS TRUE)
# Function to find required dependencies for testing.
function(find_standalone_test_dependencies)
- include(FindPythonInterp)
+ find_package (Python3 COMPONENTS Interpreter)
- if (NOT PYTHONINTERP_FOUND)
+ if (NOT Python3_Interpreter_FOUND)
message(STATUS "Could not find Python.")
message(WARNING "The check targets will not be available!")
set(ENABLE_CHECK_TARGETS FALSE PARENT_SCOPE)
@@ -207,7 +207,7 @@ function(add_openmp_testsuite target comment)
if (${OPENMP_STANDALONE_BUILD})
set(LIT_ARGS ${OPENMP_LIT_ARGS} ${ARG_ARGS})
add_custom_target(${target}
- COMMAND ${PYTHON_EXECUTABLE} ${OPENMP_LLVM_LIT_EXECUTABLE} ${LIT_ARGS} ${ARG_UNPARSED_ARGUMENTS}
+ COMMAND ${Python3_EXECUTABLE} ${OPENMP_LLVM_LIT_EXECUTABLE} ${LIT_ARGS} ${ARG_UNPARSED_ARGUMENTS}
COMMENT ${comment}
DEPENDS ${ARG_DEPENDS}
USES_TERMINAL