Merge f426a71abf31a26d0f68523e221c9ed48bac9570 into d72f9c8aea6817cdf1ca0ac10887f328de7f3da2

This commit is contained in:
fre$h 2026-03-31 11:33:36 -04:00 committed by GitHub
commit 3d12c409f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -255,7 +255,12 @@ function(cxx_executable name dir libs)
endfunction()
if(gtest_build_tests)
find_package(Python3)
# Only the interpreter is needed for Python tests. Specifying the component
# explicitly avoids a crash in CMake <= 3.23's FindPython3 module when no
# Python installation is present (the module calls list(GET) on an empty
# list). QUIET lets the build continue without Python tests instead of
# failing outright.
find_package(Python3 COMPONENTS Interpreter QUIET)
endif()
# cxx_test_with_flags(name cxx_flags libs srcs...)