summaryrefslogtreecommitdiffstats
path: root/Modules/FindPythonInterp.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-07-30 16:07:37 (GMT)
committerBrad King <brad.king@kitware.com>2019-07-30 16:09:43 (GMT)
commit800c3ab2e0b5eed54221ac37c634938ca3d273ab (patch)
treee80b80ff3c95fd924fcff94d43ac3661cf0be966 /Modules/FindPythonInterp.cmake
parent0e2e3e0f9f8ae6e57da0c914774cea7a40515e1f (diff)
downloadCMake-800c3ab2e0b5eed54221ac37c634938ca3d273ab.zip
CMake-800c3ab2e0b5eed54221ac37c634938ca3d273ab.tar.gz
CMake-800c3ab2e0b5eed54221ac37c634938ca3d273ab.tar.bz2
FindPythonInterp: Document lack of version filtering for plain `python`
Also drop the `CMakeOnly.MajorVersionSelection-PythonInterp_2` test because some environments now have a plain `python` executable for Python 3. Fixes: #19536
Diffstat (limited to 'Modules/FindPythonInterp.cmake')
-rw-r--r--Modules/FindPythonInterp.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake
index da33301..ccc7d5b 100644
--- a/Modules/FindPythonInterp.cmake
+++ b/Modules/FindPythonInterp.cmake
@@ -39,6 +39,15 @@ If calling both ``find_package(PythonInterp)`` and
``find_package(PythonLibs)``, call ``find_package(PythonInterp)`` first to
get the currently active Python version by default with a consistent version
of PYTHON_LIBRARIES.
+
+.. note::
+
+ A call to ``find_package(PythonInterp ${V})`` for python version ``V``
+ may find a ``python`` executable with no version suffix. In this case
+ no attempt is made to avoid python executables from other versions.
+ Use :module:`FindPython3`, :module:`FindPython2` or :module:`FindPython`
+ instead.
+
#]=======================================================================]
unset(_Python_NAMES)