summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCopybara-Service <copybara-worker@google.com>2022-07-18 20:30:20 (GMT)
committerCopybara-Service <copybara-worker@google.com>2022-07-18 20:30:20 (GMT)
commit71feea653b74cf33a95088749655a104d2e08206 (patch)
treef5aab105d480a5bd0e320fdec2c28d52f227d826
parent91480a4e79ed76e9edb1fa07ef852fd6c92ab924 (diff)
parent96ddde12359c8f20b6c27a99a6814c40b51f4452 (diff)
downloadgoogletest-71feea653b74cf33a95088749655a104d2e08206.zip
googletest-71feea653b74cf33a95088749655a104d2e08206.tar.gz
googletest-71feea653b74cf33a95088749655a104d2e08206.tar.bz2
Merge pull request #3939 from anpol:python-find-strategy
PiperOrigin-RevId: 461699564 Change-Id: Id7043073f106f57433a99fea0e8e4ab015bf896d
-rw-r--r--googletest/cmake/internal_utils.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake
index 107147f..42850f5 100644
--- a/googletest/cmake/internal_utils.cmake
+++ b/googletest/cmake/internal_utils.cmake
@@ -244,6 +244,12 @@ function(cxx_executable name dir libs)
${name} "${cxx_default}" "${libs}" "${dir}/${name}.cc" ${ARGN})
endfunction()
+# CMP0094 policy enables finding a Python executable in the LOCATION order, as
+# specified by the PATH environment variable.
+if (POLICY CMP0094)
+ cmake_policy(SET CMP0094 NEW)
+endif()
+
# Sets PYTHONINTERP_FOUND and PYTHON_EXECUTABLE.
if ("${CMAKE_VERSION}" VERSION_LESS "3.12.0")
find_package(PythonInterp)