From 754f4f6876f05b213b5ad2fc1a2e581bf529beb6 Mon Sep 17 00:00:00 2001 From: Marc Chevrier Date: Tue, 16 Feb 2021 11:07:51 +0100 Subject: FindPython: fix erroneous variable handling Fixes: #21817 --- Modules/FindPython/Support.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake index 79b1d18..8b2d739 100644 --- a/Modules/FindPython/Support.cmake +++ b/Modules/FindPython/Support.cmake @@ -1528,7 +1528,7 @@ if ("Interpreter" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS) if (${_PYTHON_PREFIX}_FIND_VERSION_RANGE) list (APPEND _${_PYTHON_PREFIX}_VALIDATE_OPTIONS IN_RANGE) elseif (DEFINED ${_PYTHON_PREFIX}_FIND_VERSION) - list (APPEND VERSION ${${_PYTHON_PREFIX}_FIND_VERSION}) + list (APPEND _${_PYTHON_PREFIX}_VALIDATE_OPTIONS VERSION ${${_PYTHON_PREFIX}_FIND_VERSION}) endif() while (TRUE) @@ -1996,7 +1996,7 @@ if ("Compiler" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS) if (${_PYTHON_PREFIX}_FIND_VERSION_RANGE) list (APPEND _${_PYTHON_PREFIX}_VALIDATE_OPTIONS IN_RANGE) elseif (DEFINED ${_PYTHON_PREFIX}_FIND_VERSION) - list (APPEND VERSION ${${_PYTHON_PREFIX}_FIND_VERSION}) + list (APPEND _${_PYTHON_PREFIX}_VALIDATE_OPTIONS VERSION ${${_PYTHON_PREFIX}_FIND_VERSION}) endif() while (TRUE) -- cgit v0.12