[Openmp-commits] [openmp] 9ac82f0 - [OpenMP] [cmake] In standalone mode, make Python3_EXECUTABLE available (#80828)
via Openmp-commits
openmp-commits at lists.llvm.org
Thu Feb 8 01:46:01 PST 2024
Author: Martin Storsjö
Date: 2024-02-08T11:45:57+02:00
New Revision: 9ac82f0d3ecf6c13669b0c7940920460c037a292
URL: https://github.com/llvm/llvm-project/commit/9ac82f0d3ecf6c13669b0c7940920460c037a292
DIFF: https://github.com/llvm/llvm-project/commit/9ac82f0d3ecf6c13669b0c7940920460c037a292.diff
LOG: [OpenMP] [cmake] In standalone mode, make Python3_EXECUTABLE available (#80828)
When running the tests, we try to invoke them as
"${Python3_EXECUTABLE} ${OPENMP_LLVM_LIT_EXECUTABLE}", but when running
"find_package(Python3)" within the function
"find_standalone_test_dependencies", the variable "Python3_EXECUTABLE"
only gets set within the function scope.
Tests have worked regardless of this in many cases, where executing the
python script directly succeeds. But for consistency, and for working in
cases when the python script can't be executed as such, make the
Python3_EXECUTABLE variable available as intended.
Added:
Modified:
openmp/cmake/OpenMPTesting.cmake
Removed:
################################################################################
diff --git a/openmp/cmake/OpenMPTesting.cmake b/openmp/cmake/OpenMPTesting.cmake
index df41956dadd4f4..ab2348ae59b5f0 100644
--- a/openmp/cmake/OpenMPTesting.cmake
+++ b/openmp/cmake/OpenMPTesting.cmake
@@ -10,6 +10,8 @@ function(find_standalone_test_dependencies)
message(WARNING "The check targets will not be available!")
set(ENABLE_CHECK_TARGETS FALSE PARENT_SCOPE)
return()
+ else()
+ set(Python3_EXECUTABLE ${Python3_EXECUTABLE} PARENT_SCOPE)
endif()
# Find executables.
More information about the Openmp-commits
mailing list