Skip to content

Commit 9ac82f0

Browse files
authored
[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.
1 parent ef05b4b commit 9ac82f0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

openmp/cmake/OpenMPTesting.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ function(find_standalone_test_dependencies)
1010
message(WARNING "The check targets will not be available!")
1111
set(ENABLE_CHECK_TARGETS FALSE PARENT_SCOPE)
1212
return()
13+
else()
14+
set(Python3_EXECUTABLE ${Python3_EXECUTABLE} PARENT_SCOPE)
1315
endif()
1416

1517
# Find executables.

0 commit comments

Comments
 (0)