diff options
author | Martin Storsjö <martin@martin.st> | 2024-02-08 11:45:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-08 11:45:57 +0200 |
commit | 9ac82f0d3ecf6c13669b0c7940920460c037a292 (patch) | |
tree | e689b2ecef0cef4984b0aab41926a64c3afd4c39 /openmp/cmake | |
parent | ef05b4b520ee342db6a3d6c5607f8e8729246316 (diff) | |
download | llvm-9ac82f0d3ecf6c13669b0c7940920460c037a292.zip llvm-9ac82f0d3ecf6c13669b0c7940920460c037a292.tar.gz llvm-9ac82f0d3ecf6c13669b0c7940920460c037a292.tar.bz2 |
[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.
Diffstat (limited to 'openmp/cmake')
-rw-r--r-- | openmp/cmake/OpenMPTesting.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/openmp/cmake/OpenMPTesting.cmake b/openmp/cmake/OpenMPTesting.cmake index df41956..ab2348ae 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. |