cmake: drop ERROR_QUIET in python.cmake

ERROR_QUIET should be used only when the command is actually expected to
fail, otherwise discarding stderr can be extremely time-consuming. See
recent example of time lost in commit 40c2e08e82 ("xcc/cmake: don't
discard stderr; don't (ever!) use ERROR_QUIET")

If some Python interpreter cannot even evaluate `sys.version_info[:2]`,
then we definitely don't want to hide what its stderr says about that.

Fixes commit 94de3e9f60 ("cmake: FindPython3: Adjust python3 program
search")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
Marc Herbert 2023-12-01 00:23:22 +00:00 committed by Carles Cufí
commit 13df15845e

View file

@ -31,7 +31,6 @@ if(NOT Python3_EXECUTABLE)
"import sys; sys.stdout.write('.'.join([str(x) for x in sys.version_info[:2]]))"
RESULT_VARIABLE result
OUTPUT_VARIABLE version
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(version VERSION_LESS PYTHON_MINIMUM_REQUIRED)