Skip to content

Commit 71feea6

Browse files
Merge pull request #3939 from anpol:python-find-strategy
PiperOrigin-RevId: 461699564 Change-Id: Id7043073f106f57433a99fea0e8e4ab015bf896d
2 parents 91480a4 + 96ddde1 commit 71feea6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

googletest/cmake/internal_utils.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,12 @@ function(cxx_executable name dir libs)
244244
${name} "${cxx_default}" "${libs}" "${dir}/${name}.cc" ${ARGN})
245245
endfunction()
246246

247+
# CMP0094 policy enables finding a Python executable in the LOCATION order, as
248+
# specified by the PATH environment variable.
249+
if (POLICY CMP0094)
250+
cmake_policy(SET CMP0094 NEW)
251+
endif()
252+
247253
# Sets PYTHONINTERP_FOUND and PYTHON_EXECUTABLE.
248254
if ("${CMAKE_VERSION}" VERSION_LESS "3.12.0")
249255
find_package(PythonInterp)

0 commit comments

Comments
 (0)