summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-07-24 14:58:32 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-07-24 14:58:42 (GMT)
commit07e223ad376170418efdd7fe3a6d61cd1905410f (patch)
treef982cce2f87b1e8b18485182412f26739ed061fb /Modules
parent5df471c8a4001482cc0cad05deed73e57870aecb (diff)
parent50921cc04e1ae761a188d4df0cc3025719ace11c (diff)
downloadCMake-07e223ad376170418efdd7fe3a6d61cd1905410f.zip
CMake-07e223ad376170418efdd7fe3a6d61cd1905410f.tar.gz
CMake-07e223ad376170418efdd7fe3a6d61cd1905410f.tar.bz2
Merge topic 'FindPython-fix-multiple-calls'
50921cc04e FindPython*: fix erroneous behavior on multiple 'find_package' calls Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2228
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindPython/Support.cmake6
1 files changed, 1 insertions, 5 deletions
diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake
index 08f07fd..fe3df91 100644
--- a/Modules/FindPython/Support.cmake
+++ b/Modules/FindPython/Support.cmake
@@ -196,10 +196,6 @@ endif()
set (CMAKE_FIND_FRAMEWORK LAST)
-unset (${_PYTHON_PREFIX}_VERSION_MAJOR)
-unset (${_PYTHON_PREFIX}_VERSION_MINOR)
-unset (${_PYTHON_PREFIX}_VERSION_PATCH)
-
unset (_${_PYTHON_PREFIX}_REQUIRED_VARS)
unset (_${_PYTHON_PREFIX}_CACHED_VARS)
@@ -259,7 +255,7 @@ if ("Interpreter" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS)
# try more generic names
if (NOT ${_PYTHON_PREFIX}_EXECUTABLE)
find_program (${_PYTHON_PREFIX}_EXECUTABLE
- NAMES python${${_PYTHON_PREFIX}_VERSION_MAJOR} python
+ NAMES python${_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR} python
${_${_PYTHON_PREFIX}_IRON_PYTHON_NAMES}
HINTS ${_${_PYTHON_PREFIX}_HINTS}
PATH_SUFFIXES bin)