Skip to content

Commit

Permalink
Build gmock Python tests when building with cmake
Browse files Browse the repository at this point in the history
Fixes google#4124.

PiperOrigin-RevId: 506379032
Change-Id: Ibc44ffce1012bbf313565728a3d9e5e6e56ba660
  • Loading branch information
thughes authored and kunitoki committed Nov 4, 2023
1 parent ea8cbe8 commit 5a15e99
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions googletest/cmake/internal_utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,12 @@ endif()
# Sets PYTHONINTERP_FOUND and PYTHON_EXECUTABLE.
if ("${CMAKE_VERSION}" VERSION_LESS "3.12.0")
find_package(PythonInterp)
set(PYTHONINTERP_FOUND ${PYTHONINTERP_FOUND} CACHE INTERNAL "")
set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE INTERNAL "")
else()
find_package(Python COMPONENTS Interpreter)
set(PYTHONINTERP_FOUND ${Python_Interpreter_FOUND})
set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
set(PYTHONINTERP_FOUND ${Python_Interpreter_FOUND} CACHE INTERNAL "")
set(PYTHON_EXECUTABLE ${Python_EXECUTABLE} CACHE INTERNAL "")
endif()

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

0 comments on commit 5a15e99

Please sign in to comment.