Skip to content

Commit

Permalink
Merge pull request #3114 from marbre:FindPython
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 342977338
  • Loading branch information
rogeeff committed Nov 24, 2020
2 parents 36d8eb5 + 826e9f2 commit 60b8906
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion googletest/cmake/internal_utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,13 @@ function(cxx_executable name dir libs)
endfunction()

# Sets PYTHONINTERP_FOUND and PYTHON_EXECUTABLE.
find_package(PythonInterp)
if ("${CMAKE_VERSION}" VERSION_LESS "3.12.0")
find_package(PythonInterp)
else()
find_package(Python COMPONENTS Interpreter)
set(PYTHONINTERP_FOUND ${Python_Interpreter_FOUND})
set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
endif()

# cxx_test_with_flags(name cxx_flags libs srcs...)
#
Expand Down

0 comments on commit 60b8906

Please sign in to comment.