summaryrefslogtreecommitdiff
path: root/Modules/FindPython2.cmake
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2020-10-29 17:02:55 +0100
committerMarc Chevrier <marc.chevrier@gmail.com>2020-11-03 15:12:58 +0100
commite452f6e2cf596c34e231b56803f739a878530ad9 (patch)
treef8f003d0d3e71c1b9288dacf513825c80ad64bb0 /Modules/FindPython2.cmake
parent622ac065d2abeb53de3548b7e4f3d9b5980dfa8d (diff)
downloadcmake-e452f6e2cf596c34e231b56803f739a878530ad9.tar.gz
FindPython: Adds control over artifact names to search
Fixes: #21371
Diffstat (limited to 'Modules/FindPython2.cmake')
-rw-r--r--Modules/FindPython2.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/Modules/FindPython2.cmake b/Modules/FindPython2.cmake
index 9cd22e174a..5277e33d8c 100644
--- a/Modules/FindPython2.cmake
+++ b/Modules/FindPython2.cmake
@@ -265,6 +265,22 @@ Hints
``.Net`` interpreter (i.e. ``mono`` command) is expected to be available
through the ``PATH`` variable.
+``Python2_FIND_UNVERSIONED_NAMES``
+
+ .. versionadded:: 3.20
+
+ This variable defines how the generic names will be searched. Currently, it
+ only applies to the generic names of the interpreter, namely, ``python2`` and
+ ``python``.
+ The ``Python2_FIND_UNVERSIONED_NAMES`` variable can be set to one of the
+ following values:
+
+ * ``FIRST``: The generic names are searched before the more specialized ones
+ (such as ``python2.5`` for example).
+ * ``LAST``: The generic names are searched after the more specialized ones.
+ This is the default.
+ * ``NEVER``: The generic name are not searched at all.
+
Artifacts Specification
^^^^^^^^^^^^^^^^^^^^^^^